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
DistanceWeightedEdges as edge type.- See Also:
-
Field Summary
Fields inherited from interface org.jgrapht.Graph
DEFAULT_EDGE_WEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionDistanceWeightedGraph(Supplier<NodeInput> vertexSupplier, Supplier<DistanceWeightedEdge> edgeSupplier) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidsetEdgeWeight(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.voidsetEdgeWeight(DistanceWeightedEdge edge, tech.units.indriya.ComparableQuantity<javax.measure.quantity.Length> weight) Methods inherited from class org.jgrapht.graph.SimpleWeightedGraph
createBuilder, createBuilderMethods 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, vertexSetMethods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
setEdgeWeightin interfaceorg.jgrapht.Graph<NodeInput,DistanceWeightedEdge> - Overrides:
setEdgeWeightin classorg.jgrapht.graph.AbstractBaseGraph<NodeInput,DistanceWeightedEdge> - Parameters:
edge- the edge whose weight should be altereddistanceInMeters- the weight of theDistanceWeightedEdgein meters
-