Package org.drip.graph.core
Class Edge
java.lang.Object
org.drip.graph.core.Edge
public class Edge
extends java.lang.Object
Edge represents the Connection between a Pair of Vertexes. 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 Edge(java.lang.String sourceVertexName, java.lang.String destinationVertexName, double weight)
Edge Constructor -
Method Summary
Modifier and Type Method Description boolean
compareWith(Edge edge)
Compare the Current Edge with the Specified Onejava.lang.String
destinationVertexName()
Retrieve the Destination Vertex NameEdge
invert()
Retrieve a new "Inverted" Edgejava.lang.String
sourceVertexName()
Retrieve the Source Vertex Namejava.lang.String
toString()
double
weight()
Retrieve the WeightMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Edge
public Edge(java.lang.String sourceVertexName, java.lang.String destinationVertexName, double weight) throws java.lang.ExceptionEdge Constructor- Parameters:
sourceVertexName
- Source Vertex NamedestinationVertexName
- Destination Vertex Nameweight
- Weight- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
sourceVertexName
public java.lang.String sourceVertexName()Retrieve the Source Vertex Name- Returns:
- The Source Vertex Name
-
destinationVertexName
public java.lang.String destinationVertexName()Retrieve the Destination Vertex Name- Returns:
- The Destination Vertex Name
-
weight
public double weight()Retrieve the Weight- Returns:
- The Weight
-
compareWith
Compare the Current Edge with the Specified One- Parameters:
edge
- The "Other" Edge- Returns:
- TRUE - If the Edges are the same
-
invert
Retrieve a new "Inverted" Edge- Returns:
- New "Inverted" Edge
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-