Package classycle.graph
Class StrongComponent
- java.lang.Object
-
- classycle.graph.Vertex
-
- classycle.graph.StrongComponent
-
-
Constructor Summary
Constructors Constructor Description StrongComponent()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVertex(AtomicVertex vertex)
Adds the specified vertex to this strong component.void
calculateAttributes()
Calculates all graph properties of this component.int
getLongestWalk()
int
getNumberOfVertices()
Returns the number of vertices building this strong component.AtomicVertex
getVertex(int index)
Returns the vertex of the specified index.boolean
isActive()
void
reset()
Reset this component.void
setActive(boolean active)
void
setLongestWalk(int longestWalk)
java.lang.String
toString()
Returns toString() of the attributes and the number of incoming and outgoing arcs.-
Methods inherited from class classycle.graph.Vertex
addIncomingArcTo, addOutgoingArcTo, compareTo, getAttributes, getHeadVertex, getNumberOfIncomingArcs, getNumberOfOutgoingArcs, getTailVertex, isVisited, visit
-
-
-
-
Constructor Detail
-
StrongComponent
public StrongComponent()
Default constructor. TheAttributes
of a strong component will a null pointer.
-
-
Method Detail
-
getNumberOfVertices
public int getNumberOfVertices()
Returns the number of vertices building this strong component.
-
getVertex
public AtomicVertex getVertex(int index)
Returns the vertex of the specified index.
-
addVertex
public void addVertex(AtomicVertex vertex)
Adds the specified vertex to this strong component. Note, that added vertices are inserted at index 0 of the list of vertices.
-
calculateAttributes
public void calculateAttributes()
Calculates all graph properties of this component. These properties can be obtained from getAttributes casted asGraphAttributes
.
-
reset
public void reset()
Reset this component. Calls reset of the superclass. Sets the activity flag to false and the longest walk to -1.
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
getLongestWalk
public int getLongestWalk()
-
setLongestWalk
public void setLongestWalk(int longestWalk)
-
-