graphlab.library
Class BaseVertex

java.lang.Object
  extended by graphlab.library.BaseVertex
Direct Known Subclasses:
SimpleVertex, 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

Constructor Summary
BaseVertex()
           
BaseVertex(BaseVertexProperties prop)
           
 
Method Summary
 int getColor()
          Returns the color of the vertex.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseVertex

public BaseVertex(BaseVertexProperties prop)

BaseVertex

public BaseVertex()
Method Detail

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:
col - 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.