Package edu.ie3.datamodel.graph
Class ImpedanceWeightedGraph
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,ImpedanceWeightedEdge>
edu.ie3.datamodel.graph.ImpedanceWeightedGraph
- All Implemented Interfaces:
Serializable,Cloneable,org.jgrapht.Graph<NodeInput,ImpedanceWeightedEdge>
public class ImpedanceWeightedGraph
extends org.jgrapht.graph.SimpleWeightedGraph<NodeInput,ImpedanceWeightedEdge>
An impedance weighted graph that uses
ImpedanceWeightedEdges as edge type.- See Also:
-
Field Summary
Fields inherited from interface org.jgrapht.Graph
DEFAULT_EDGE_WEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionImpedanceWeightedGraph(Supplier<NodeInput> vertexSupplier, Supplier<ImpedanceWeightedEdge> edgeSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetEdgeWeight(ImpedanceWeightedEdge edge, double impedanceInOhm) Deprecated.voidsetEdgeWeightQuantity(ImpedanceWeightedEdge edge, tech.units.indriya.ComparableQuantity<javax.measure.quantity.ElectricResistance> 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
-
ImpedanceWeightedGraph
public ImpedanceWeightedGraph() -
ImpedanceWeightedGraph
public ImpedanceWeightedGraph(Supplier<NodeInput> vertexSupplier, Supplier<ImpedanceWeightedEdge> edgeSupplier)
-
-
Method Details
-
setEdgeWeightQuantity
public void setEdgeWeightQuantity(ImpedanceWeightedEdge edge, tech.units.indriya.ComparableQuantity<javax.measure.quantity.ElectricResistance> weight) - Parameters:
edge- edge whose weight should be alteredweight- the weight of theImpedanceWeightedEdge
-
setEdgeWeight
@Deprecated(since="Deprecated since 2.1.0. See Javadocs for more information.") public void setEdgeWeight(ImpedanceWeightedEdge edge, double impedanceInOhm) Deprecated.UsesetEdgeWeightQuantity(ImpedanceWeightedEdge, ComparableQuantity)instead, as it provides means for proper unit handlingThe 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 thesetEdgeWeightQuantity(ImpedanceWeightedEdge, ComparableQuantity)for safety purposes that the provided edge weight is correct.- Specified by:
setEdgeWeightin interfaceorg.jgrapht.Graph<NodeInput,ImpedanceWeightedEdge> - Overrides:
setEdgeWeightin classorg.jgrapht.graph.AbstractBaseGraph<NodeInput,ImpedanceWeightedEdge> - Parameters:
edge- the edge whose weight should be alteredimpedanceInOhm- the weight of theImpedanceWeightedEdgein ohm
-
setEdgeWeightQuantity(ImpedanceWeightedEdge, ComparableQuantity)instead, as it provides means for proper unit handling