Package org.jgrapht.graph.specifics
Class ArrayUnenforcedSetEdgeSetFactory<V,E>
- java.lang.Object
-
- org.jgrapht.graph.specifics.ArrayUnenforcedSetEdgeSetFactory<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
Serializable
,EdgeSetFactory<V,E>
public class ArrayUnenforcedSetEdgeSetFactory<V,E> extends Object implements EdgeSetFactory<V,E>, Serializable
An edge set factory which createsArrayUnenforcedSet
of size 1, suitable for small degree vertices.- Author:
- Barak Naveh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArrayUnenforcedSetEdgeSetFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<E>
createEdgeSet(V vertex)
Create a new edge set for a particular vertex.
-
-
-
Method Detail
-
createEdgeSet
public Set<E> createEdgeSet(V vertex)
Create a new edge set for a particular vertex.- Specified by:
createEdgeSet
in interfaceEdgeSetFactory<V,E>
- 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
-
-