|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.intel.hadoop.graphbuilder.graph.VertexRecord<VidType,VertexData>
VidType
- the type of vertex id.VertexData
- the type of vertex data.public class VertexRecord<VidType,VertexData>
Represents a distributed vertex. A vertex in a distributed graph partitioned by vertex separators may belong to multiple partitions. The vertex separators are set of vertices whose removal leads to disjoint partitions of the original graph. Therefore, a vertex record maintains the global information about a vertex in the distributed setting. Among the partitions which contains a certain vertex, one of the partition will be the owner of that vertex, and the vertex copy on other partitions are called mirrors.
Constructor Summary | |
---|---|
VertexRecord()
Default constructor of an empty vertex record. |
|
VertexRecord(VidType gvid)
Creates a vertex record of a given vertex id. |
Method Summary | |
---|---|
void |
addMirror(short i)
|
int |
inEdges()
|
java.util.List<java.lang.Short> |
mirrorList()
|
int |
numMirrors()
|
int |
outEdges()
|
short |
owner()
|
void |
removeMirror(short i)
|
void |
setInEdges(int inEdges)
|
void |
setMirrors(java.util.BitSet mirrors)
|
void |
setMirrorsFromList(java.util.List<java.lang.Integer> mirrors,
int numProcs)
|
void |
setOutEdges(int outEdges)
the number of edges whose source vertex equals to this vertex in the entire graph. |
void |
setOwner(short owner)
|
void |
setVdata(VertexData vdata)
|
void |
setVid(VidType id)
|
java.lang.String |
toString()
|
VertexData |
vdata()
|
VidType |
vid()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VertexRecord()
public VertexRecord(VidType gvid)
gvid
- the global id of the vertex.Method Detail |
---|
public int numMirrors()
public VidType vid()
public void setVid(VidType id)
id
- the new vertex id.public int inEdges()
public void setInEdges(int inEdges)
inEdges
- the number of edges whose target vertex equals to this vertex in
the entire graph.public int outEdges()
public void setOutEdges(int outEdges)
outEdges
- public VertexData vdata()
public void setVdata(VertexData vdata)
vdata
- the new vertex data.public short owner()
public void setOwner(short owner)
owner
- the owner partition id of the vertex.public java.util.List<java.lang.Short> mirrorList()
public void setMirrorsFromList(java.util.List<java.lang.Integer> mirrors, int numProcs)
mirrors
- a list representation of the mirrors of this vertex.numProcs
- total number of partitions.public void setMirrors(java.util.BitSet mirrors)
mirrors
- a bitset representation of the mirrors.public void addMirror(short i)
i
- a new partition id to be added to the mirror list.public void removeMirror(short i)
i
- the partition id to be removed from the mirror list.public final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |