Package edu.ie3.datamodel.graph
Class DistanceWeightedGraph
java.lang.Object
org.jgrapht.graph.AbstractGraph<V,E>
org.jgrapht.graph.AbstractBaseGraph<V,E>
org.jgrapht.graph.SimpleGraph<V,E>
org.jgrapht.graph.SimpleWeightedGraph<NodeInput,DistanceWeightedEdge>
edu.ie3.datamodel.graph.DistanceWeightedGraph
- All Implemented Interfaces:
Serializable
,Cloneable
,org.jgrapht.Graph<NodeInput,
DistanceWeightedEdge>
public class DistanceWeightedGraph
extends org.jgrapht.graph.SimpleWeightedGraph<NodeInput,DistanceWeightedEdge>
A distance weighted graph that uses
DistanceWeightedEdge
s as edge type.- See Also:
-
Field Summary
Fields inherited from interface org.jgrapht.Graph
DEFAULT_EDGE_WEIGHT
-
Constructor Summary
ConstructorDescriptionDistanceWeightedGraph
(Supplier<NodeInput> vertexSupplier, Supplier<DistanceWeightedEdge> edgeSupplier) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
setEdgeWeight
(DistanceWeightedEdge edge, double distanceInMeters) The only purpose for overriding this method is to provide a better indication of the unit that is expected to be passed in.void
setEdgeWeight
(DistanceWeightedEdge edge, tech.units.indriya.ComparableQuantity<javax.measure.quantity.Length> weight) Methods inherited from class org.jgrapht.graph.SimpleWeightedGraph
createBuilder, createBuilder
Methods inherited from class org.jgrapht.graph.AbstractBaseGraph
addEdge, addEdge, addVertex, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, iterables, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSupplier, setVertexSupplier, vertexSet
Methods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapht.Graph
containsEdge, removeAllEdges, removeAllEdges, removeAllVertices, setEdgeWeight
-
Constructor Details
-
DistanceWeightedGraph
public DistanceWeightedGraph() -
DistanceWeightedGraph
public DistanceWeightedGraph(Supplier<NodeInput> vertexSupplier, Supplier<DistanceWeightedEdge> edgeSupplier)
-
-
Method Details
-
setEdgeWeight
public void setEdgeWeight(DistanceWeightedEdge edge, tech.units.indriya.ComparableQuantity<javax.measure.quantity.Length> weight) - Parameters:
edge
- edge whose weight should be alteredweight
- the weight of theDistanceWeightedEdge
-
setEdgeWeight
The only purpose for overriding this method is to provide a better indication of the unit that is expected to be passed in. It is highly advised to use thesetEdgeWeight(DistanceWeightedEdge, ComparableQuantity)
for safety purposes that the provided edge weight is correct.- Specified by:
setEdgeWeight
in interfaceorg.jgrapht.Graph<NodeInput,
DistanceWeightedEdge> - Overrides:
setEdgeWeight
in classorg.jgrapht.graph.AbstractBaseGraph<NodeInput,
DistanceWeightedEdge> - Parameters:
edge
- the edge whose weight should be altereddistanceInMeters
- the weight of theDistanceWeightedEdge
in meters
-