|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.visualize.data.GraphModels
Constants and utilities related to graph-like models and their topology.
Method Summary | |
static java.util.Collection |
findAllEdgePorts(PortModel seed,
int seedEnd,
int otherEnd,
java.util.Collection retVal)
Returns the port models connected to a seed port, and its subports, through edges with the specified edge end types. |
static java.util.Collection |
findEdgePorts(PortModel seed,
int seedEnd,
int otherEnd,
java.util.Collection retVal)
Returns the port models connected to a seed port, but not its subports, through edges with the specified edge end types. |
static java.util.Collection |
findEdgeVertices(VertexModel seed,
int seedEnd,
int otherEnd,
java.util.Collection retVal)
Returns the vertex models connected to a seed vertex through edges with the specified edge end types. |
static java.util.Collection |
findSinks(java.util.Collection parts,
java.util.Collection retVal)
Finds the sink vertex models in a group of part models. |
static java.util.Collection |
findSources(java.util.Collection parts,
java.util.Collection retVal)
Finds the source vertex models in a group of part models. |
static boolean |
hasEdgeVertices(VertexModel seed,
int seedEnd,
int otherEnd)
Returns true if any vertex models are connected to a seed vertex through edges with the specified edge end types. |
static boolean |
isSink(VertexModel vert)
Returns true if a vertex is a sink node (no outgoing edges). |
static boolean |
isSource(VertexModel vert)
Returns true if a vertex is a source node (no incoming edges). |
static java.util.Collection |
toVertices(java.util.Collection ports,
java.util.Collection retVal)
Gets the vertex models corresponding a group of port models. |
static java.util.List |
traceGraph(VertexModel seedNode,
VertexModel pruneNode,
boolean traceForward,
boolean traceBackward,
java.util.List retVal)
Performs a breadth-first search of a graph starting with a seed node and returning the graph nodes found. |
static java.util.List |
traceList(VertexModel seedNode,
VertexModel pruneNode,
boolean traceForward,
java.util.List retVal)
Performs a search of a graph starting with a seed node and returning a list of nodes found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.util.Collection toVertices(java.util.Collection ports, java.util.Collection retVal)
ports
- The port models (PortModel). Never null.retVal
- Return value object. The vertex models (VertexModel)
in the iterator order of ports. Never null. Can be ports.
public static java.util.Collection findEdgeVertices(VertexModel seed, int seedEnd, int otherEnd, java.util.Collection retVal)
seed
- The seed vertex. Never null.seedEnd
- Edge port index associated with the seed end type
(such as EdgeModel.INDEX_???_END). >=0.otherEnd
- Edge port index associated with the other end type
(such as EdgeModel.INDEX_???_END). >=0.retVal
- Return value object. The connected vertex models
(VertexModel), possibly including seed. If not a set, may contain
duplicates. Reflects the relative order of the edges. Never null.
java.lang.IllegalArgumentException
- Seed and other ends are the same.public static java.util.Collection findEdgePorts(PortModel seed, int seedEnd, int otherEnd, java.util.Collection retVal)
seed
- The seed port. Never null.seedEnd
- Edge port index associated with the seed end type
(such as EdgeModel.INDEX_???_END). >=0.otherEnd
- Edge port index associated with the other end type
(such as EdgeModel.INDEX_???_END). >=0.retVal
- Return value object. The connected port models
(PortModel), possibly including seed. If not a set, may contain
duplicates. Reflects the relative order of the edges. Never null.
java.lang.IllegalArgumentException
- Seed and other end are the same.public static java.util.Collection findAllEdgePorts(PortModel seed, int seedEnd, int otherEnd, java.util.Collection retVal)
seed
- The seed port. Never null.seedEnd
- Edge port index associated with the seed end type
(such as EdgeModel.INDEX_???_END). >=0.otherEnd
- Edge port index associated with the other end type
(such as EdgeModel.INDEX_???_END). >=0.retVal
- Return value object. The connected port models
(PortModel), possibly including seed. If not a set, may contain
duplicates. Reflects the relative order of the edges. Never null.
java.lang.IllegalArgumentException
- Seed and other end are the same.public static boolean hasEdgeVertices(VertexModel seed, int seedEnd, int otherEnd)
seedEnd
- Edge port index associated with the seed end type
(such as EdgeModel.INDEX_???_END). >=0.otherEnd
- Edge port index associated with the other end type
(such as EdgeModel.INDEX_???_END). >=0.
public static boolean isSource(VertexModel vert)
vert
- The vertex. Never null.
public static boolean isSink(VertexModel vert)
vert
- The vertex. Never null.
public static java.util.Collection findSources(java.util.Collection parts, java.util.Collection retVal)
retVal
- Return value object. The source models (VertexModel).
Reflects the relative order of the models in parts. Never null.
Can be verts.
public static java.util.Collection findSinks(java.util.Collection parts, java.util.Collection retVal)
retVal
- Return value object. The sink models (VertexModel).
Reflects the relative order of the models in parts. Never null.
Can be verts.
public static java.util.List traceGraph(VertexModel seedNode, VertexModel pruneNode, boolean traceForward, boolean traceBackward, java.util.List retVal)
seedNode
- The seed graph node of the trace. The seed is included
in the trace unless pruned. If null, the trace will be empty.pruneNode
- A graph node whose subgraph will be pruned from
the trace. The prune node is excluded from the trace. Null
if none (prune nothing from the trace). If the seed, the trace is
generated and then the seed is removed.traceForward
- If true, forward connections (tail to head)
are traced.traceBackward
- If true, backward connections (head to tail)
are traced.retVal
- Return value object. The trace, as a list of vertex
models (VertexModel). Never null. Empty if seed is null. The
seed will be the first entry if not pruned. Any previous entries
will be lost.
java.lang.IllegalArgumentException
- The return value object is null.public static java.util.List traceList(VertexModel seedNode, VertexModel pruneNode, boolean traceForward, java.util.List retVal)
seedNode
- The seed graph node of the trace. The seed is included
in the trace unless pruned. If null, the trace will be empty.pruneNode
- A graph node whose subgraph will be pruned from
the trace. The prune node is excluded from the trace. Null
if none (prune nothing from the trace). If the seed, the trace is
generated and then the seed is removed.traceForward
- If true, forward connections (tail to head)
are traced; otherwise, backward connections (head to tail)
are traced.retVal
- Return value object. The trace, as a list of vertex
models (VertexModel). Never null. Empty if seed is null. The
seed will be the first entry if not pruned. Any previous entries
will be lost.
java.lang.IllegalArgumentException
- The return value object is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |