jdsl.core.algo.graphtraversals
Class BCTree
java.lang.Object
|
+--jdsl.core.algo.graphtraversals.BCTree
- public class BCTree
- extends java.lang.Object
- implements InspectableTree
|
Field Summary |
static Position |
NOSUCHPOSITION
Returned by getCutPosBetween(Position, Position)
if no cut-position exists between the two parameter positions. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NOSUCHPOSITION
public static final Position NOSUCHPOSITION
- Returned by
getCutPosBetween(Position, Position)
if no cut-position exists between the two parameter positions.
isCutVertex
public boolean isCutVertex(Vertex v)
- Parameters:
v - A vertex in InspectableGraph graph().- Returns:
- true if the vertex is a cut-vertex, false
otherwise.
isCutEdge
public boolean isCutEdge(Edge e)
- Parameters:
e - An edge in InspectableGraph graph().- Returns:
- true if the edge is a cut-edge, false otherwise.
isCutPosition
public boolean isCutPosition(Position p)
- Parameters:
p - A position in the InspectableGraph graph().- Returns:
- true if the position is a cut-position, false
otherwise.
areInSameBlock
public boolean areInSameBlock(Position a,
Position b)
- Parameters:
a - A position in the InspectableGraph graph()b - A position in the InspectableGraph graph()- Returns:
- true if both a and b belong to the same block of graph
elements (i.e., the same biconnected component), false otherwise
areInAdjacentBlocks
public boolean areInAdjacentBlocks(Position a,
Position b)
- Parameters:
a - A position in the InspectableGraph graph()b - A position in the InspectableGraph graph()- Returns:
- true if the block to which a belongs is the parent
of the block to which b belongs or vice versa; false otherwise
areBiconnected
public boolean areBiconnected(Position a,
Position b)
- Parameters:
a - A position in the InspectableGraph graph()b - A position in the InspectableGraph graph()- Returns:
- true if a and b are in the same biconnected component,
false otherwise.
getCutPosBetween
public Position getCutPosBetween(Position a,
Position b)
- Parameters:
a - A position in the InspectableGraph graph()b - A position in the InspectableGraph graph()- Returns:
- A cut-position between the two parameter positions in the
analyzed graph.
Returns null if there are no blocks separating the blocks holding
a and b.
graph
public InspectableGraph graph()
- Returns:
- The graph of which this data structure is an analysis
newContainer
public Container newContainer()
- Container methods
elements
public java.util.Enumeration elements()
size
public int size()
isEmpty
public boolean isEmpty()
positions
public java.util.Enumeration positions()
- PositionalContainer methods
replace
public java.lang.Object replace(Position p,
java.lang.Object obj)
throws InvalidPositionException
swap
public void swap(Position a,
Position b)
throws InvalidPositionException
isRoot
public boolean isRoot(Position p)
throws InvalidPositionException,
InvalidContainerException
- InspectableTree methods
- Specified by:
- isRoot in interface InspectableTree
isInternal
public boolean isInternal(Position p)
throws InvalidContainerException,
InvalidPositionException
- Specified by:
- isInternal in interface InspectableTree
isExternal
public boolean isExternal(Position p)
throws InvalidPositionException,
InvalidContainerException
- Specified by:
- isExternal in interface InspectableTree
root
public Position root()
throws InvalidContainerException
- Specified by:
- root in interface InspectableTree
parent
public Position parent(Position p)
throws InvalidContainerException,
InvalidPositionException
- Specified by:
- parent in interface InspectableTree
children
public java.util.Enumeration children(Position p)
throws InvalidContainerException,
InvalidPositionException
- Specified by:
- children in interface InspectableTree
siblings
public java.util.Enumeration siblings(Position p)
throws InvalidPositionException,
InvalidContainerException
- Specified by:
- siblings in interface InspectableTree