java.lang.Object
org.jgrapht.graph.DefaultGraphSpecificsStrategy<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
Serializable
,GraphSpecificsStrategy<V,
E>
public class DefaultGraphSpecificsStrategy<V,E>
extends Object
implements GraphSpecificsStrategy<V,E>
A default lookup specifics strategy implementation.
Graphs constructed using this strategy require the least amount of memory, at the expense of slow
edge retrievals. Methods which depend on edge retrievals, e.g. getEdge(V u, V v), containsEdge(V
u, V v), addEdge(V u, V v), etc may be relatively slow when the average degree of a vertex is
high (dense graphs). For a fast implementation, use FastLookupGraphSpecificsStrategy
.
- Author:
- Dimitrios Michail
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a function which creates the intrusive edges specifics.Get a function which creates the specifics.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.GraphSpecificsStrategy
getEdgeSetFactory
-
Constructor Details
-
DefaultGraphSpecificsStrategy
public DefaultGraphSpecificsStrategy()
-
-
Method Details
-
getIntrusiveEdgesSpecificsFactory
Description copied from interface:GraphSpecificsStrategy
Get a function which creates the intrusive edges specifics. The factory will accept the graph type as a parameter.Note that it is very important to use a map implementation which respects iteration order.
- Specified by:
getIntrusiveEdgesSpecificsFactory
in interfaceGraphSpecificsStrategy<V,
E> - Returns:
- a function which creates intrusive edges specifics.
-
getSpecificsFactory
Description copied from interface:GraphSpecificsStrategy
Get a function which creates the specifics. The factory will accept the graph type as a parameter.- Specified by:
getSpecificsFactory
in interfaceGraphSpecificsStrategy<V,
E> - Returns:
- a function which creates intrusive edges specifics.
-