Class StrongComponent

  • All Implemented Interfaces:
    java.lang.Comparable<Vertex>

    public class StrongComponent
    extends Vertex
    A strong component is a subgraph of a directed graph where every two vertices are mutually reachable.
    Author:
    Franz-Josef Elmer
    • Constructor Detail

      • StrongComponent

        public StrongComponent()
        Default constructor. The Attributes 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 as GraphAttributes.
      • reset

        public void reset()
        Reset this component. Calls reset of the superclass. Sets the activity flag to false and the longest walk to -1.
        Overrides:
        reset in class Vertex
      • isActive

        public boolean isActive()
      • setActive

        public void setActive​(boolean active)
      • getLongestWalk

        public int getLongestWalk()
      • setLongestWalk

        public void setLongestWalk​(int longestWalk)
      • toString

        public java.lang.String toString()
        Description copied from class: Vertex
        Returns toString() of the attributes and the number of incoming and outgoing arcs.
        Overrides:
        toString in class Vertex