Class OrderedVertexGroup

java.lang.Object
org.drip.graph.search.OrderedVertexGroup

public class OrderedVertexGroup
extends java.lang.Object
OrderedVertexGroup holds the Grouping of the Ordered Search (BFS/DFS) of the Vertexes of a Graph. The References are:

  • Cormen, T., C. E. Leiserson, R. Rivest, and C. Stein (2009): Introduction to Algorithms 3rd Edition MIT Press
  • de Fraysseix, H., O. de Mendez, and P. Rosenstiehl (2006): Tremaux Trees and Planarity International Journal of Foundations of Computer Science 17 (5) 1017-1030
  • Mehlhorn, K., and P. Sanders (2008): Algorithms and Data Structures: The Basic Tool-box Springer
  • Wikipedia (2020): Breadth-first Search https://en.wikipedia.org/wiki/Breadth-first_search
  • Wikipedia (2020): Depth-first Search https://en.wikipedia.org/wiki/Depth-first_search




Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    OrderedVertexGroup()
    OrderedVertexGroup Constructor
  • Method Summary

    Modifier and Type Method Description
    boolean addVertexName​(java.lang.String vertexName)
    Add the specified Vertex to the Search
    boolean containsCycle()
    Indicate if the Ordered Search contains a Cycle
    java.util.Collection<java.lang.String> lexicographicalOrdering()
    Retrieve the Set of Lexicographically Ordered Vertexes
    java.util.Collection<java.lang.String> postOrder()
    Retrieve the Set of Post-ordered Vertexes
    java.util.Collection<java.lang.String> preOrder()
    Retrieve the Set of Pre-ordered Vertexes
    java.util.Collection<java.lang.String> reversePostOrder()
    Retrieve the Set of Reverse Post-ordered Vertexes
    java.util.Collection<java.lang.String> reversePreOrder()
    Retrieve the Set of Reverse Pre-ordered Vertexes
    boolean setContainsCycle()
    Set to Indicate that the Ordered Search contains a Cycle
    java.util.Collection<java.lang.String> topologicalSorting()
    Retrieve the Set of Topologically Ordered Vertexes
    boolean touchVertex​(java.lang.String vertexName)
    "Touch" the specified Vertex
    java.util.List<java.lang.String> vertexNameList()
    Retrieve the List of Visited Vertexes
    java.util.Set<java.lang.String> vertexNameSet()
    Retrieve the Set of available Vertexes
    boolean vertexPresent​(java.lang.String vertexName)
    Indicate if the Specified Vertex in Present in the Search

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OrderedVertexGroup

      public OrderedVertexGroup()
      OrderedVertexGroup Constructor
  • Method Details

    • vertexNameSet

      public java.util.Set<java.lang.String> vertexNameSet()
      Retrieve the Set of available Vertexes
      Returns:
      Set of available Vertexes
    • vertexNameList

      public java.util.List<java.lang.String> vertexNameList()
      Retrieve the List of Visited Vertexes
      Returns:
      List of Visited Vertexes
    • containsCycle

      public boolean containsCycle()
      Indicate if the Ordered Search contains a Cycle
      Returns:
      TRUE - The Ordered Search contains a Cycle
    • vertexPresent

      public boolean vertexPresent​(java.lang.String vertexName)
      Indicate if the Specified Vertex in Present in the Search
      Parameters:
      vertexName - The Vertex Name
      Returns:
      TRUE - The Specified Vertex is present in the Search
    • addVertexName

      public boolean addVertexName​(java.lang.String vertexName)
      Add the specified Vertex to the Search
      Parameters:
      vertexName - The Vertex Name
      Returns:
      TRUE - The Specified Vertex successfully added to the Search
    • touchVertex

      public boolean touchVertex​(java.lang.String vertexName)
      "Touch" the specified Vertex
      Parameters:
      vertexName - The Vertex Name
      Returns:
      TRUE - The Specified Vertex successfully "touched"
    • setContainsCycle

      public boolean setContainsCycle()
      Set to Indicate that the Ordered Search contains a Cycle
      Returns:
      TRUE - The Indicator successfully set
    • preOrder

      public java.util.Collection<java.lang.String> preOrder()
      Retrieve the Set of Pre-ordered Vertexes
      Returns:
      Set of Pre-ordered Vertexes
    • postOrder

      public java.util.Collection<java.lang.String> postOrder()
      Retrieve the Set of Post-ordered Vertexes
      Returns:
      Set of Post-ordered Vertexes
    • reversePreOrder

      public java.util.Collection<java.lang.String> reversePreOrder()
      Retrieve the Set of Reverse Pre-ordered Vertexes
      Returns:
      Set of Reverse Pre-ordered Vertexes
    • reversePostOrder

      public java.util.Collection<java.lang.String> reversePostOrder()
      Retrieve the Set of Reverse Post-ordered Vertexes
      Returns:
      Set of Reverse Post-ordered Vertexes
    • lexicographicalOrdering

      public java.util.Collection<java.lang.String> lexicographicalOrdering()
      Retrieve the Set of Lexicographically Ordered Vertexes
      Returns:
      Set of Lexicographically Ordered Vertexes
    • topologicalSorting

      public java.util.Collection<java.lang.String> topologicalSorting()
      Retrieve the Set of Topologically Ordered Vertexes
      Returns:
      Set of Topologically Ordered Vertexes