|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.intel.hadoop.graphbuilder.graph.glgraph.EdgeListStorage<EdgeData>
EdgeData
- public class EdgeListStorage<EdgeData>
Stores a list of edges as 3 separate arrays of source id, target id and edge
data respectively. This class is used as a temporary storage for edges in the
GLGraph
before finalization.
GLGraph.addEdge(Object, Object, Object)
,
GLGraph.finalize()
Field Summary | |
---|---|
java.util.ArrayList<EdgeData> |
edata
A list of edge data. |
java.util.ArrayList<java.lang.Integer> |
sources
A list of source vertex ids. |
java.util.ArrayList<java.lang.Integer> |
targets
A list of target vertex ids. |
Constructor Summary | |
---|---|
EdgeListStorage()
Default constructor of an empty EdgeListStorage. |
|
EdgeListStorage(int size)
Creates an empty EdgeListStorage with expected size. |
Method Summary | |
---|---|
void |
addEdge(java.lang.Integer source,
java.lang.Integer target,
EdgeData data)
Add an edge with source, target and edata to the storage. |
void |
addEdges(java.util.List<java.lang.Integer> sourceList,
java.util.List<java.lang.Integer> targetList,
java.util.List<EdgeData> dataList)
Add a list of edges. |
void |
clear()
Removing all edges from the storage. |
void |
inplace_shuffle(java.util.List<java.lang.Integer> permute)
Inplace shuffle the edges in the storage by a permutation array. |
void |
reserve(int n)
Reserves the space for n edges. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList<EdgeData> edata
public java.util.ArrayList<java.lang.Integer> sources
public java.util.ArrayList<java.lang.Integer> targets
Constructor Detail |
---|
public EdgeListStorage()
public EdgeListStorage(int size)
size
- Method Detail |
---|
public void reserve(int n)
n
- the number of edges to be added.public void addEdge(java.lang.Integer source, java.lang.Integer target, EdgeData data)
source
- target
- data
- public void addEdges(java.util.List<java.lang.Integer> sourceList, java.util.List<java.lang.Integer> targetList, java.util.List<EdgeData> dataList) throws java.lang.Exception
sourceList
- targetList
- dataList
-
java.lang.Exception
public int size()
public void clear()
public void inplace_shuffle(java.util.List<java.lang.Integer> permute) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |