edu.umd.cloud9.example.pagerank
Class PageRankNode
java.lang.Object
edu.umd.cloud9.example.pagerank.PageRankNode
- All Implemented Interfaces:
- Writable
public class PageRankNode
- extends Object
- implements Writable
Representation of a graph node for PageRank.
- Author:
- Jimmy Lin, Michael Schatz
TYPE_COMPLETE
public static final int TYPE_COMPLETE
- See Also:
- Constant Field Values
TYPE_MASS
public static final int TYPE_MASS
- See Also:
- Constant Field Values
TYPE_STRUCTURE
public static final int TYPE_STRUCTURE
- See Also:
- Constant Field Values
PageRankNode
public PageRankNode()
getPageRank
public float getPageRank()
setPageRank
public void setPageRank(float p)
getNodeId
public int getNodeId()
setNodeId
public void setNodeId(int n)
getAdjacenyList
public ArrayListOfIntsWritable getAdjacenyList()
setAdjacencyList
public void setAdjacencyList(ArrayListOfIntsWritable l)
getType
public int getType()
setType
public void setType(int type)
readFields
public void readFields(DataInput in)
throws IOException
- Deserializes this object.
- Specified by:
readFields in interface Writable
- Parameters:
in - source for raw byte representation
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Serializes this object.
- Specified by:
write in interface Writable
- Parameters:
out - where to write the raw byte representation
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object