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 voidaddVertex(AtomicVertex vertex)Adds the specified vertex to this strong component.voidcalculateAttributes()Calculates all graph properties of this component.intgetLongestWalk()intgetNumberOfVertices()Returns the number of vertices building this strong component.AtomicVertexgetVertex(int index)Returns the vertex of the specified index.booleanisActive()voidreset()Reset this component.voidsetActive(boolean active)voidsetLongestWalk(int longestWalk)java.lang.StringtoString()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. TheAttributesof 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)
-
-