Package org.jgrapht
Interface WeightedGraph<V,E>
- All Superinterfaces:
Graph<V,E>
- All Known Implementing Classes:
AsWeightedGraph,DefaultDirectedWeightedGraph,DirectedWeightedMultigraph,DirectedWeightedSubgraph,ListenableDirectedWeightedGraph,ListenableUndirectedWeightedGraph,SimpleDirectedWeightedGraph,SimpleWeightedGraph,UndirectedWeightedSubgraph,WeightedMultigraph,WeightedPseudograph
An interface for a graph whose edges have non-uniform weights.
- Since:
- Jul 23, 2003
- Author:
- Barak Naveh
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default weight for an edge. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetEdgeWeight(E e, double weight) Assigns a weight to an edge.Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
-
Field Details
-
DEFAULT_EDGE_WEIGHT
static final double DEFAULT_EDGE_WEIGHTThe default weight for an edge.- See Also:
-
-
Method Details
-
setEdgeWeight
Assigns a weight to an edge.- Parameters:
e- edge on which to set weightweight- new weight for edge
-