GraphLab Project

graphlab.library
Class BaseVertex

java.lang.Object
  extended by graphlab.library.BaseVertex
Direct Known Subclasses:
VertexModel

public class BaseVertex
extends java.lang.Object

The base class for all vertices. By default each vertex has a integer property named color.

Author:
Omid Aladini

Field Summary
protected  BaseVertexProperties prop
           
 
Constructor Summary
BaseVertex()
           
BaseVertex(BaseVertexProperties prop)
           
 
Method Summary
 int getColor()
          Returns the color of the vertex.
 BaseVertex getCopy()
           
 int getId()
          Returns the index of the vertex in the graph.
 boolean getMark()
          Returns true if the vertex is already marked.
 BaseVertexProperties getProp()
          Returns property object for this vertex.
 void setColor(int color)
          Sets the color of the vertex.
 void setMark(boolean mark)
          Flag whether it is marked.
 void setProp(BaseVertexProperties prop)
          Sets properties object for this vertex; Overwrites the existing.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prop

protected BaseVertexProperties prop
Constructor Detail

BaseVertex

public BaseVertex(BaseVertexProperties prop)

BaseVertex

public BaseVertex()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCopy

public BaseVertex getCopy()

getColor

public int getColor()
Returns the color of the vertex.

Returns:
The color associated with the vertex.

setColor

public void setColor(int color)
Sets the color of the vertex.

Parameters:
color - Sets col as the color of the vertex.

getMark

public boolean getMark()
Returns true if the vertex is already marked.

Returns:
Returns true if the vertex is already marked.

setMark

public void setMark(boolean mark)
Flag whether it is marked.

Parameters:
mark - whether the vertex is marked.

getId

public int getId()
Returns the index of the vertex in the graph.

Returns:
Returns the index of the vertex in the graph.

setProp

public void setProp(BaseVertexProperties prop)
Sets properties object for this vertex; Overwrites the existing.

Parameters:
prop - The property object to set.

getProp

public BaseVertexProperties getProp()
Returns property object for this vertex.

Returns:
Returns property object for this vertex.

GraphLab Project