|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
VidType
- VertexData
- EdgeData
- public interface Graph<VidType,VertexData,EdgeData>
A distributed graph partition consists of 3 parts: a partition id, a
collection of local edges, and a collection of VertexRecord
s.
Method Summary | |
---|---|
void |
addEdge(VidType source,
VidType target,
EdgeData edata)
Add a single edge to the graph. |
void |
addEdges(java.util.List<VidType> sources,
java.util.List<VidType> targets,
java.util.List<EdgeData> edata)
Batch add a collection of edges to the graph. |
void |
addVertexRecord(VertexRecord<VidType,VertexData> vrecord)
Add a vertex record to the graph. |
void |
clear()
Reset the graph to its initial empty state. |
void |
finalize()
This method shall be called to ensure that the graph is in its finalized state and is ready for output. |
int |
numEdges()
|
int |
numVertices()
|
int |
pid()
|
void |
reserveEdgeSpace(int numEdges)
|
void |
reserveVertexSpace(int numVertices)
|
void |
setPid(int pid)
|
Method Detail |
---|
int pid()
void setPid(int pid)
pid
- partition id of this graph.void reserveEdgeSpace(int numEdges)
numEdges
- expected number of edges in the graph.void reserveVertexSpace(int numVertices)
numVertices
- expected number of vertices in the graph.int numVertices()
int numEdges()
void addEdges(java.util.List<VidType> sources, java.util.List<VidType> targets, java.util.List<EdgeData> edata) throws java.lang.Exception
sources
- List of source vertex ids.targets
- List of target vertex ids.edata
- List of edge data.
java.lang.Exception
- when any of the input is null or sources, targets and edata are
of different lengthvoid addEdge(VidType source, VidType target, EdgeData edata)
source
- the source vertex id of the edge to be added.target
- the target vertex id of the edge to be added.edata
- the edge data of the edge to be added.void addVertexRecord(VertexRecord<VidType,VertexData> vrecord)
vrecord
- the VertexRecord
object to be added.VertexRecord
void finalize() throws java.lang.Exception
java.lang.Exception
void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |