V - the graph vertex typeE - the graph edge typepublic class WeightedIntrusiveEdgesSpecifics<V,E> extends BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveWeightedEdge> implements IntrusiveEdgesSpecifics<V,E>
The implementation optimizes the use of DefaultWeightedEdge and subclasses. For other
custom user edge types, a map is used to store vertex source, target and weight.
edgeMap, unmodifiableEdgeSet| Constructor and Description |
|---|
WeightedIntrusiveEdgesSpecifics()
Deprecated.
Since default strategies should be decided at a higher level.
|
WeightedIntrusiveEdgesSpecifics(Map<E,org.jgrapht.graph.IntrusiveWeightedEdge> map)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e,
V sourceVertex,
V targetVertex)
Add a new edge
|
double |
getEdgeWeight(E e)
Get the weight of an edge.
|
protected org.jgrapht.graph.IntrusiveWeightedEdge |
getIntrusiveEdge(E e)
Get the intrusive edge of an edge.
|
void |
setEdgeWeight(E e,
double weight)
Set the weight of an edge
|
containsEdge, getEdgeSet, getEdgeSource, getEdgeTarget, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsEdge, getEdgeSet, getEdgeSource, getEdgeTarget, remove@Deprecated public WeightedIntrusiveEdgesSpecifics()
public boolean add(E e, V sourceVertex, V targetVertex)
BaseIntrusiveEdgesSpecificsadd in interface IntrusiveEdgesSpecifics<V,E>add in class BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveWeightedEdge>e - the edgesourceVertex - the source vertex of the edgetargetVertex - the target vertex of the edgepublic double getEdgeWeight(E e)
BaseIntrusiveEdgesSpecificsgetEdgeWeight in interface IntrusiveEdgesSpecifics<V,E>getEdgeWeight in class BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveWeightedEdge>e - the edgepublic void setEdgeWeight(E e, double weight)
BaseIntrusiveEdgesSpecificssetEdgeWeight in interface IntrusiveEdgesSpecifics<V,E>setEdgeWeight in class BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveWeightedEdge>e - the edgeweight - the new weightprotected org.jgrapht.graph.IntrusiveWeightedEdge getIntrusiveEdge(E e)
BaseIntrusiveEdgesSpecificsgetIntrusiveEdge in class BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveWeightedEdge>e - the edgeCopyright © 2018. All rights reserved.