Package org.drip.graph.core
Class Directed<V>
java.lang.Object
org.drip.graph.core.Network<V>
org.drip.graph.core.Directed<V>
- Direct Known Subclasses:
CompleteBipartite
,CompleteRandomGraph
,NDimensionalHypercube
public class Directed<V> extends Network<V>
Directed implements the Vertex/Edge Topology corresponding to a Directed Graph. 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
Constructors Constructor Description Directed()
Directed Constructor -
Method Summary
Modifier and Type Method Description boolean
addGraph(Directed<V> graph)
Add the Specified Graph to the Currentboolean
areVertexesAdjacent(java.lang.String vertexName1, java.lang.String vertexName2)
Indicate if the specified Vertexes are AdjacentDirected<V>
clone()
Clone the existing Graph into a New Oneboolean
containsCycle()
Indicate if the Graph contains a Cyclejava.util.Set<Edge>
fundamentalCycleEdgeSet(Tree<?> tree)
Retrieve the Set of the Fundamental Cycles using the Spanning Treeboolean
isComplete()
Indicate if the Graph is Completeboolean
isConnected()
Indicate if the Graph is Connectedboolean
isCyclical()
Indicate if the Graph is Cyclicalboolean
isDense()
Indicate if the Graph is Denseboolean
isTree()
Indicate if the Graph is a Treeboolean
isTreeSpanning(Tree<?> tree)
Indicate of the Specified Tree spans the Graphdouble
kirchoffSpanningTreeCount()
Retrieve the Count of the Spanning Trees Using Kirchoff's Matrix-Tree Theoremjava.util.List<java.lang.String>
leafVertexNameList()
Retrieve the List of the Leaf Vertex Namesdouble
spanningTreeCount()
Retrieve the Count of the Spanning TreesDirected<V>
Transpose()
Transpose the Edges of the Current Graph to create a new Oneint
type()
Retrieve the Graph Typejava.util.Map<java.lang.String,java.lang.Integer>
vertexDegreeMap()
Retrieve the Map of the Vertex Adjacency DegreeMethods inherited from class org.drip.graph.core.Network
addBidirectionalEdge, addBidirectionalEdge, addEdge, addEdge, addVertex, addVertex, containsEdge, containsVertex, edgeCount, edgeMap, edgePriorityQueue, initialVertexName, isEdgeACycle, isEmpty, length, removeEdge, vertexCount, vertexMap, vertexNameSet, vertexValue
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Directed
public Directed()Directed Constructor
-
-
Method Details
-
addGraph
Add the Specified Graph to the Current- Parameters:
graph
- The Specified Graph- Returns:
- TRUE - The Specified Graph successfully Added
-
clone
Clone the existing Graph into a New One- Returns:
- The Cloned Graph
-
isConnected
public boolean isConnected()Indicate if the Graph is Connected- Returns:
- TRUE - The Graph is Connected
-
isTreeSpanning
Indicate of the Specified Tree spans the Graph- Parameters:
tree
- The Tree- Returns:
- TRUE - The Tree spans the Graph
-
fundamentalCycleEdgeSet
Retrieve the Set of the Fundamental Cycles using the Spanning Tree- Parameters:
tree
- Spanning Tree- Returns:
- Set of the Fundamental Cycles using the Spanning Tree
-
leafVertexNameList
public java.util.List<java.lang.String> leafVertexNameList()Retrieve the List of the Leaf Vertex Names- Returns:
- List of the Leaf Vertex Names
-
containsCycle
public boolean containsCycle()Indicate if the Graph contains a Cycle- Returns:
- TRUE - The Graph contains a Cycle
-
isCyclical
public boolean isCyclical()Indicate if the Graph is Cyclical- Returns:
- TRUE - The Graph is Cyclical
-
isTree
public boolean isTree()Indicate if the Graph is a Tree- Returns:
- TRUE - The Graph is a Tree
-
isComplete
public boolean isComplete()Indicate if the Graph is Complete- Returns:
- TRUE - The Graph is Complete
-
isDense
public boolean isDense()Indicate if the Graph is Dense- Returns:
- TRUE - The Graph is Dense
-
vertexDegreeMap
public java.util.Map<java.lang.String,java.lang.Integer> vertexDegreeMap()Retrieve the Map of the Vertex Adjacency Degree- Returns:
- Map of the Vertex Adjacency Degree
-
areVertexesAdjacent
public boolean areVertexesAdjacent(java.lang.String vertexName1, java.lang.String vertexName2)Indicate if the specified Vertexes are Adjacent- Parameters:
vertexName1
- Vertex #1vertexName2
- Vertex #2- Returns:
- TRUE - The Vertexes are Adjacent
-
type
public int type()Retrieve the Graph Type- Returns:
- The Graph Type
-
kirchoffSpanningTreeCount
public double kirchoffSpanningTreeCount()Retrieve the Count of the Spanning Trees Using Kirchoff's Matrix-Tree Theorem- Returns:
- Count of the Spanning Trees Using Kirchoff's Matrix-Tree Theorem
-
spanningTreeCount
public double spanningTreeCount()Retrieve the Count of the Spanning Trees- Returns:
- Count of the Spanning Trees
-
Transpose
Transpose the Edges of the Current Graph to create a new One- Returns:
- The Transposed Graph
-