java.lang.Object
org.jgrapht.alg.connectivity.TreeDynamicConnectivity.Node
- Enclosing class:
TreeDynamicConnectivity<T>
An internal representation of the tree nodes.
Keeps track of the node values and outgoing arcs. The outgoing arcs are placed according to the order they are traversed in the Euler tour
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) DoublyLinkedList
<TreeDynamicConnectivity<T>.Arc> Arcs list(package private) Map
<TreeDynamicConnectivity<T>.Node, TreeDynamicConnectivity<T>.Arc> Target node to arc mapping(package private) T
Node value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addArcAfter
(TreeDynamicConnectivity<T>.Arc arc, TreeDynamicConnectivity<T>.Arc newArc) Inserts thenewArc
in the arc list after thearc
(package private) void
Append thearc
to the arc list(package private) TreeDynamicConnectivity<T>.Arc
getArcTo
(TreeDynamicConnectivity<T>.Node node) Returns an arc, which target is equal to thenode
(package private) TreeDynamicConnectivity<T>.Arc
Returns an arc which is stored right after thearc
.boolean
Checks if this node is a zero-degree node(package private) void
removeArc
(TreeDynamicConnectivity<T>.Arc arc) Removes thearc
from the arc listtoString()
-
Field Details
-
value
T valueNode value -
arcs
Arcs list -
targetMap
Map<TreeDynamicConnectivity<T>.Node,TreeDynamicConnectivity<T>.Arc> targetMapTarget node to arc mapping
-
-
Constructor Details
-
Node
Constructs a new node- Parameters:
value
- a user specified element to store in this node
-
-
Method Details
-
removeArc
Removes thearc
from the arc list- Parameters:
arc
- an arc to remove
-
addArcLast
Append thearc
to the arc list- Parameters:
arc
- an arc to add
-
addArcAfter
Inserts thenewArc
in the arc list after thearc
- Parameters:
arc
- an arc already stored in the arc listnewArc
- a new arc to add to the arc list
-
getArcTo
Returns an arc, which target is equal to thenode
- Parameters:
node
- a target of the returned arc- Returns:
- an arc, which target is equal to the
node
-
getNextArc
Returns an arc which is stored right after thearc
. The result may be equal to thearc
- Parameters:
arc
- an arc stored in the arc list- Returns:
- an arc which is stored right after the
arc
-
isSingleton
public boolean isSingleton()Checks if this node is a zero-degree node- Returns:
true
if this node is a singleton node,false otherwise
-
toString
-