Package org.jgrapht.graph
Interface EdgeSetFactory<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Known Implementing Classes:
ArrayUnenforcedSetEdgeSetFactory
public interface EdgeSetFactory<V,E>
A factory for edge sets. This interface allows the creator of a graph to choose theSet
implementation used internally by the graph to maintain sets of edges. This provides control over performance tradeoffs between memory and CPU usage.- Author:
- John V. Sichi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<E>
createEdgeSet(V vertex)
Create a new edge set for a particular vertex.
-
-
-
Method Detail
-
createEdgeSet
Set<E> createEdgeSet(V vertex)
Create a new edge set for a particular vertex.- Parameters:
vertex
- the vertex for which the edge set is being created; sophisticated factories may be able to use this information to choose an optimal set representation (e.g. ArrayUnenforcedSet for a vertex expected to have low degree, and LinkedHashSet for a vertex expected to have high degree)- Returns:
- new set
-
-