classycle.graph
Class AtomicVertex

java.lang.Object
  extended by classycle.graph.Vertex
      extended by classycle.graph.AtomicVertex
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
PackageVertex

public class AtomicVertex
extends Vertex

A subclass of Vertex with the following additional properties:

The last two properties are used in Tarjan's algorithm to find the strong components (see StrongComponentProcessor).

Author:
Franz-Josef Elmer

Constructor Summary
AtomicVertex(Attributes attributes)
          Creates an instance for the specified attributes.
 
Method Summary
 int getLow()
          Returns the current value of the low function.
 int getOrder()
          Returns the order of visiting.
 boolean isGraphVertex()
          Returns true if this vertex belongs to a graph.
 void reset()
          Reset this instance.
 void setDefaultValueOfGraphVertexFlag(boolean flag)
          Sets the default value of graphVertex flag.
 void setLow(int low)
          Sets the current value of the low function.
 void setOrder(int order)
          Sets the order of visiting.
 
Methods inherited from class classycle.graph.Vertex
addIncomingArcTo, addOutgoingArcTo, compareTo, getAttributes, getHeadVertex, getNumberOfIncomingArcs, getNumberOfOutgoingArcs, getTailVertex, isVisited, toString, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomicVertex

public AtomicVertex(Attributes attributes)
Creates an instance for the specified attributes.

Method Detail

reset

public void reset()
Reset this instance. That is, it becomes a unvisited vertex where order = low = -1. Whether it is a graph vertex or not depends on the default value defined by the method setDefaultValueOfGraphVertexFlag(boolean).

Overrides:
reset in class Vertex

isGraphVertex

public boolean isGraphVertex()
Returns true if this vertex belongs to a graph.


setDefaultValueOfGraphVertexFlag

public void setDefaultValueOfGraphVertexFlag(boolean flag)
Sets the default value of graphVertex flag.

See Also:
reset()

getOrder

public int getOrder()
Returns the order of visiting.


setOrder

public void setOrder(int order)
Sets the order of visiting.


getLow

public int getLow()
Returns the current value of the low function.


setLow

public void setLow(int low)
Sets the current value of the low function.