Package org.drip.graph.core
Class Network<V>
java.lang.Object
org.drip.graph.core.Network<V>
public abstract class Network<V>
extends java.lang.Object
Network implements a Generic Topological Network containing Discrete Vertexes and Edges. 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
-
Method Summary
Modifier and Type Method Description boolean
addBidirectionalEdge(Edge edge)
Add a Bidirectional Edge to the Networkboolean
addBidirectionalEdge(Edge edge, java.util.Map<java.lang.String,V> vertexValueMap)
Add a Bidirectional Edge to the Networkboolean
addEdge(Edge edge)
Add an Edge to the Networkboolean
addEdge(Edge edge, java.util.Map<java.lang.String,V> vertexValueMap)
Add an Edge to the Networkboolean
addVertex(java.lang.String vertexName)
Add a Vertex to the Networkboolean
addVertex(java.lang.String vertexName, V vertexValue)
Add a Vertex to the Networkboolean
containsEdge(Edge edgeOther)
Indicate if the Specified Edge matches with any Edges in the Networkboolean
containsVertex(java.lang.String vertexName)
Indicate if the Vertex is Contained in the Networkint
edgeCount()
Retrieve the Count of the Edgesjava.util.Map<java.lang.String,Edge>
edgeMap()
Retrieve the Edge MapPriorityQueue<java.lang.Double,java.lang.String>
edgePriorityQueue(boolean minHeap)
Construct an Edge Priority Queuejava.lang.String
initialVertexName()
Retrieve the Initial Vertex Nameboolean
isEdgeACycle(Edge edge)
Indicate if the Edge forms a Cycle with the Networkboolean
isEmpty()
Indicate if the Network is Emptydouble
length()
Retrieve the Length of the Discrete Objectboolean
removeEdge(java.lang.String edgeKey)
Remove an Edge from the Networkint
vertexCount()
Retrieve the Count of the Vertexesjava.util.Map<java.lang.String,Vertex<?>>
vertexMap()
Retrieve the Vertex Mapjava.util.Set<java.lang.String>
vertexNameSet()
Retrieve the Set of Vertex NamesV
vertexValue(java.lang.String vertexName)
Retrieve the Value contained in the VertexMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
vertexMap
Retrieve the Vertex Map- Returns:
- The Vertex Map
-
edgeMap
Retrieve the Edge Map- Returns:
- The Edge Map
-
initialVertexName
public java.lang.String initialVertexName()Retrieve the Initial Vertex Name- Returns:
- The Initial Vertex Name
-
edgeCount
public int edgeCount()Retrieve the Count of the Edges- Returns:
- The Count of the Edges
-
vertexCount
public int vertexCount()Retrieve the Count of the Vertexes- Returns:
- The Count of the Vertexes
-
vertexNameSet
public java.util.Set<java.lang.String> vertexNameSet()Retrieve the Set of Vertex Names- Returns:
- The Set of Vertex Names
-
vertexValue
Retrieve the Value contained in the Vertex- Parameters:
vertexName
- Vertex Name- Returns:
- Value contained in the Vertex
-
addVertex
public boolean addVertex(java.lang.String vertexName)Add a Vertex to the Network- Parameters:
vertexName
- The Vertex Name- Returns:
- TRUE - The Vertex successfully added to the Network
-
addVertex
Add a Vertex to the Network- Parameters:
vertexName
- The Vertex NamevertexValue
- The Vertex Value- Returns:
- TRUE - The Vertex successfully added to the Network
-
addEdge
Add an Edge to the Network- Parameters:
edge
- The Edge- Returns:
- TRUE - The Edge successfully added
-
addEdge
Add an Edge to the Network- Parameters:
edge
- The EdgevertexValueMap
- Vertex Value Map- Returns:
- TRUE - The Edge successfully added
-
addBidirectionalEdge
Add a Bidirectional Edge to the Network- Parameters:
edge
- The Bidirectional Edge- Returns:
- TRUE - The Bidirectional Edge successfully added
-
addBidirectionalEdge
Add a Bidirectional Edge to the Network- Parameters:
edge
- The Bidirectional EdgevertexValueMap
- Vertex Value Map- Returns:
- TRUE - The Bidirectional Edge successfully added
-
removeEdge
public boolean removeEdge(java.lang.String edgeKey)Remove an Edge from the Network- Parameters:
edgeKey
- The Edge Key- Returns:
- TRUE - The Edge successfully removed
-
edgePriorityQueue
Construct an Edge Priority Queue- Parameters:
minHeap
- TRUE - The Priority Queue is in the Ascending Order of Weight- Returns:
- The Edge Priority Queue
-
isEmpty
public boolean isEmpty()Indicate if the Network is Empty- Returns:
- TRUE - The Network is Empty
-
containsVertex
public boolean containsVertex(java.lang.String vertexName)Indicate if the Vertex is Contained in the Network- Parameters:
vertexName
- The Vertex Name- Returns:
- TRUE - The Vertex is Contained in the Network
-
length
public double length()Retrieve the Length of the Discrete Object- Returns:
- Length of the Discrete Object
-
isEdgeACycle
Indicate if the Edge forms a Cycle with the Network- Parameters:
edge
- The Edge- Returns:
- TRUE - The Edge forms a Cycle with the Network
-
containsEdge
Indicate if the Specified Edge matches with any Edges in the Network- Parameters:
edgeOther
- The "Other" Edge- Returns:
- TRUE - The Specified Edge matches with any Edges in the Network
-