com.intel.hadoop.graphbuilder.graph.glgraph
Class EdgeList
java.lang.Object
com.intel.hadoop.graphbuilder.graph.glgraph.EdgeList
- All Implemented Interfaces:
- java.lang.Iterable<EdgeType>
public class EdgeList
- extends java.lang.Object
- implements java.lang.Iterable<EdgeType>
A lazy list representation of a collection of edges that satisfy a direction
property with respect to a center vertex. In other words, given a center
vertex v, the list represents either the incoming or outgoing edges of v
depending on the direction variable dir
. The list has a pointer to an
SparseGraphStruct
object as its backend storage. The element of the
list is an EdgeType
object which contains lazy pointers to the
storage used for obtaining the actual data when evaluated.
- See Also:
SparseGraphStruct
,
EdgeType
Constructor Summary |
EdgeList()
Default constructor. |
EdgeList(int vid,
SparseGraphStruct store,
EdgeType.DIR dir)
Construct an EdgeList containing all edges in the SparseGraphStruct
that are incoming (outgoing) edges with respect to the given vertex. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EdgeList
public EdgeList()
- Default constructor. Creates an empty edge list.
EdgeList
public EdgeList(int vid,
SparseGraphStruct store,
EdgeType.DIR dir)
- Construct an EdgeList containing all edges in the
SparseGraphStruct
that are incoming (outgoing) edges with respect to the given vertex. The
direction is determined by the parameter dir
.
- Parameters:
vid
- the center vertex id.store
- the backend storage of all edges.dir
- the direction of edges with respect to the center vertex.
size
public int size()
- Returns:
- the size of the list.
isEmpty
public boolean isEmpty()
- Returns:
- wheter the list is empty.
iterator
public java.util.Iterator<EdgeType> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<EdgeType>