T
- the type of the data to store in Vertices of this graphpublic interface WeightedGraph<T> extends Graph<T>
Modifier and Type | Method and Description |
---|---|
Edge<T> |
addEdge(Vertex<T> source,
Vertex<T> target,
double weight)
Adds an Edge to the graph between two Vertices with the given weight
|
addVertex, getEdges, getVertices, removeAllEdges, removeAllVertices
Edge<T> addEdge(Vertex<T> source, Vertex<T> target, double weight)
source
- the Vertex the edge starts at (arbitrary for undirected
graphs)target
- the Vertex the edge ends at (arbitrary for undirected graphs)weight
- the weight of this edge