Package org.drip.graph.core
Class Vertex<V>
java.lang.Object
org.drip.graph.core.Vertex<V>
public class Vertex<V>
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
- Module = Computational Core Module
- Library = Graph Algorithm Library
- Project = Graph Optimization and Tree Construction Algorithms
- Package = Vertexes, Edges, Trees, and Graphs
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.lang.String
addEdge(Edge edge)
Add an EdgePriorityQueue<java.lang.Double,Edge>
adjacencyPriorityQueue(boolean minHeap)
Retrieve the Ordered Adjacency Priority Queueint
branchingFactor()
Retrieve the Branching Factor of the Vertexjava.util.Map<java.lang.String,java.lang.Integer>
destinationCounterMap()
Retrieve the Destination Edge Counter Mapjava.util.List<Edge>
destinationEdgeList(java.lang.String sourceVertexName, java.lang.String destinationVertexName)
Generate the List of Edges between the Source and the Destinationjava.util.Map<java.lang.String,Edge>
edgeMap()
Retrieve the Edge Mapboolean
isLeaf()
Indicate if the Vertex is a Leafjava.lang.String
name()
Retrieve the Vertex Namejava.util.Set<java.lang.String>
neighboringVertexNameSet()
Retrieve the Set of Neighboring Vertex Namesint
outDegree()
Retrieve the Out-Degree of the Vertexboolean
removeEdge(java.lang.String edgeKey)
Remove the Edge from the Edge Mapstatic Vertex<?>
Standard(java.lang.String name)
Construct a Standard, Non-templated Instance of VertexV
value()
Retrieve the Vertex ValueMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Vertex
Vertex Constructor- Parameters:
name
- The Vertex Namevalue
- The Vertex Value- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
Standard
Construct a Standard, Non-templated Instance of Vertex- Parameters:
name
- Vertex Name- Returns:
- Standard, Non-templated Instance of Vertex
-
name
public java.lang.String name()Retrieve the Vertex Name- Returns:
- The Vertex Name
-
value
Retrieve the Vertex Value- Returns:
- The Vertex Value
-
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
Retrieve the Edge Map- Returns:
- The Edge Map
-
addEdge
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
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 NamedestinationVertexName
- 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
-