Package org.jgrapht.graph
Class UniformIntrusiveEdgesSpecifics<V,E>
- java.lang.Object
-
- org.jgrapht.graph.BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveEdge>
-
- org.jgrapht.graph.UniformIntrusiveEdgesSpecifics<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
Serializable
,IntrusiveEdgesSpecifics<V,E>
public class UniformIntrusiveEdgesSpecifics<V,E> extends BaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveEdge> implements IntrusiveEdgesSpecifics<V,E>
An uniform weights variant of the intrusive edges specifics.The implementation optimizes the use of
DefaultEdge
and subclasses. For other custom user edge types, a map is used to store vertex source and target.- Author:
- Barak Naveh, Dimitrios Michail
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.jgrapht.graph.BaseIntrusiveEdgesSpecifics
edgeMap, unmodifiableEdgeSet
-
-
Constructor Summary
Constructors Constructor Description UniformIntrusiveEdgesSpecifics(Map<E,org.jgrapht.graph.IntrusiveEdge> map)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E e, V sourceVertex, V targetVertex)
Add a new edgeprotected org.jgrapht.graph.IntrusiveEdge
getIntrusiveEdge(E e)
Get the intrusive edge of an edge.-
Methods inherited from class org.jgrapht.graph.BaseIntrusiveEdgesSpecifics
containsEdge, getEdgeSet, getEdgeSource, getEdgeTarget, getEdgeWeight, remove, setEdgeWeight
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.graph.IntrusiveEdgesSpecifics
containsEdge, getEdgeSet, getEdgeSource, getEdgeTarget, getEdgeWeight, remove, setEdgeWeight
-
-
-
-
Method Detail
-
add
public boolean add(E e, V sourceVertex, V targetVertex)
Description copied from class:BaseIntrusiveEdgesSpecifics
Add a new edge- Specified by:
add
in interfaceIntrusiveEdgesSpecifics<V,E>
- Specified by:
add
in classBaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveEdge>
- Parameters:
e
- the edgesourceVertex
- the source vertex of the edgetargetVertex
- the target vertex of the edge- Returns:
- true if the edge was added, false if the edge was already present
-
getIntrusiveEdge
protected org.jgrapht.graph.IntrusiveEdge getIntrusiveEdge(E e)
Description copied from class:BaseIntrusiveEdgesSpecifics
Get the intrusive edge of an edge.- Specified by:
getIntrusiveEdge
in classBaseIntrusiveEdgesSpecifics<V,E,org.jgrapht.graph.IntrusiveEdge>
- Parameters:
e
- the edge- Returns:
- the intrusive edge
-
-