edu.uci.ics.jung.utils
Class TypedVertexGenerator
java.lang.Object
edu.uci.ics.jung.utils.TypedVertexGenerator
- All Implemented Interfaces:
- VertexGenerator
public class TypedVertexGenerator
- extends Object
- implements VertexGenerator
Generates vertices according to the edge requirements
submitted to the constructor. This implementation
respects edge direction (directed, undirected, mixed)
as well as edge multiplicity (parallel edges). See the
constructor for a list of the vertex types.
- Author:
- Joshua O'Madadhain
Constructor Summary |
TypedVertexGenerator(ArchetypeGraph g)
|
TypedVertexGenerator(Collection edge_requirements)
Determines the type of vertices that this generator will
create, according to the edge requirements specified
in the constructor:
undirected, no parallel edges - creates @link{SimpleUndirectedSparseVertex}
directed, no parallel edges - creates @link{SimpleDirectedSparseVertex}
mixed (directed and undirected), no parallel edges - creates @link{SimpleSparseVertex}
undirected, parallel edges allowed - creates @link{UndirectedSparseVertex}
directed, parallel edges allowed - creates @link{DirectedSparseVertex}
mixed, parallel edges allowed - creates @link{SparseVertex}
|
Method Summary |
Vertex |
create()
Creates a vertex whose type is determined by the requirements
specified in the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected Object type
simple
protected boolean simple
- if true, generated vertices won't support parallel edges
UNDIRECTED
protected static final Object UNDIRECTED
DIRECTED
protected static final Object DIRECTED
MIXED
protected static final Object MIXED
TypedVertexGenerator
public TypedVertexGenerator(Collection edge_requirements)
- Determines the type of vertices that this generator will
create, according to the edge requirements specified
in the constructor:
undirected, no parallel edges - creates @link{SimpleUndirectedSparseVertex}
directed, no parallel edges - creates @link{SimpleDirectedSparseVertex}
mixed (directed and undirected), no parallel edges - creates @link{SimpleSparseVertex}
undirected, parallel edges allowed - creates @link{UndirectedSparseVertex}
directed, parallel edges allowed - creates @link{DirectedSparseVertex}
mixed, parallel edges allowed - creates @link{SparseVertex}
TypedVertexGenerator
public TypedVertexGenerator(ArchetypeGraph g)
create
public Vertex create()
- Creates a vertex whose type is determined by the requirements
specified in the constructor.
- Specified by:
create
in interface VertexGenerator
- See Also:
VertexGenerator.create()