Class Vertex

java.lang.Object
org.drip.graph.core.Vertex

public class Vertex
extends java.lang.Object
Vertex implements a Single Vertex Node and the corresponding Egresses emanating from it. The References are:

  • Bollobas, B. (1998): Modern Graph Theory Springer
  • Eppstein, D. (1999): Spanning Trees and Spanners https://www.ics.uci.edu/~eppstein/pubs/Epp-TR-96-16.pdf
  • Gross, J. L., and J. Yellen (2005): Graph Theory and its Applications Springer
  • Kocay, W., and D. L. Kreher (2004): Graphs, Algorithms, and Optimizations CRC Press
  • Wikipedia (2020): Spanning Tree https://en.wikipedia.org/wiki/Spanning_tree




Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    Vertex​(java.lang.String name)
    Vertex Constructor
  • Method Summary

    Modifier and Type Method Description
    java.lang.String addEdge​(Edge edge)
    Add an Edge
    PriorityQueue<java.lang.Double,​Edge> adjacencyPriorityQueue​(boolean minHeap)
    Retrieve the Ordered Adjacency Priority Queue
    int branchingFactor()
    Retrieve the Branching Factor of the Vertex
    java.util.Map<java.lang.String,​java.lang.Integer> destinationCounterMap()
    Retrieve the Destination Edge Counter Map
    java.util.List<Edge> destinationEdgeList​(java.lang.String sourceVertexName, java.lang.String destinationVertexName)
    Generate the List of Edges between the Source and the Destination
    java.util.Map<java.lang.String,​Edge> edgeMap()
    Retrieve the Edge Map
    boolean isLeaf()
    Indicate if the Vertex is a Leaf
    java.lang.String name()
    Retrieve the Vertex Name
    java.util.Set<java.lang.String> neighboringVertexNameSet()
    Retrieve the Set of Neighboring Vertex Names
    int outDegree()
    Retrieve the Out-Degree of the Vertex
    boolean removeEdge​(java.lang.String edgeKey)
    Remove the Edge from the Edge Map

    Methods inherited from class java.lang.Object

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

    • Vertex

      public Vertex​(java.lang.String name) throws java.lang.Exception
      Vertex Constructor
      Parameters:
      name - The Vertex Name
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • name

      public java.lang.String name()
      Retrieve the Vertex Name
      Returns:
      The Vertex Name
    • destinationCounterMap

      public java.util.Map<java.lang.String,​java.lang.Integer> destinationCounterMap()
      Retrieve the Destination Edge Counter Map
      Returns:
      The Destination Edge Counter Map
    • edgeMap

      public java.util.Map<java.lang.String,​Edge> edgeMap()
      Retrieve the Edge Map
      Returns:
      The Edge Map
    • addEdge

      public java.lang.String addEdge​(Edge edge)
      Add an Edge
      Parameters:
      edge - The Edge
      Returns:
      The Edge Key
    • removeEdge

      public boolean removeEdge​(java.lang.String edgeKey)
      Remove the Edge from the Edge Map
      Parameters:
      edgeKey - The Edge Key
      Returns:
      TRUE - The Edge represented by the Key successfully removed
    • adjacencyPriorityQueue

      public PriorityQueue<java.lang.Double,​Edge> adjacencyPriorityQueue​(boolean minHeap)
      Retrieve the Ordered Adjacency Priority Queue
      Parameters:
      minHeap - TRUE - The Priority Queue is in the Ascending Order of Weight
      Returns:
      The Ordered Adjacency Priority Queue
    • destinationEdgeList

      public java.util.List<Edge> destinationEdgeList​(java.lang.String sourceVertexName, java.lang.String destinationVertexName)
      Generate the List of Edges between the Source and the Destination
      Parameters:
      sourceVertexName - Source Vertex Name
      destinationVertexName - Destination Vertex Name
      Returns:
      List of Edges between the Source and the Destination
    • neighboringVertexNameSet

      public java.util.Set<java.lang.String> neighboringVertexNameSet()
      Retrieve the Set of Neighboring Vertex Names
      Returns:
      The Set of Neighboring Vertex Names
    • outDegree

      public int outDegree()
      Retrieve the Out-Degree of the Vertex
      Returns:
      Out-Degree of the Vertex
    • branchingFactor

      public int branchingFactor()
      Retrieve the Branching Factor of the Vertex
      Returns:
      Branching Factor of the Vertex
    • isLeaf

      public boolean isLeaf()
      Indicate if the Vertex is a Leaf
      Returns:
      TRUE - The Vertex is a Leaf