public interface WeightedGraph extends Graph
Modifier and Type | Method and Description |
---|---|
boolean |
addEdge(int begin,
int end,
double weight)
Adds a weighted edge between two vertices.
|
double |
getWeight(int begin,
int end)
Gets the weight of the edge between two vertices.
|
double |
missingEdgeSentinel()
Returns the "sentinel" weight value for edges not in the graph.
|
boolean |
setWeight(int begin,
int end,
double weight)
Sets the weight of an edge already in the graph.
|
addVertex, clear, getDegree, getInDegree, getNeighbors, hasEdge, isDirected, isEmpty, numEdges, numVerts
boolean addEdge(int begin, int end, double weight)
boolean setWeight(int begin, int end, double weight)
double getWeight(int begin, int end)
double missingEdgeSentinel()