Package com.mxgraph.analysis
Class mxUnionFind.Node
java.lang.Object
com.mxgraph.analysis.mxUnionFind.Node
- Enclosing class:
mxUnionFind
A class that defines the identity of a set.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxUnionFind.Node
Reference to the parent node.protected int
The size of the tree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getSize()
void
setParent
(mxUnionFind.Node parent) void
setSize
(int size)
-
Field Details
-
parent
Reference to the parent node. Root nodes point to themselves. -
size
protected int sizeThe size of the tree. Initial value is 1.
-
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
getParent
- Returns:
- Returns the parent node
-
setParent
- Parameters:
parent
- The parent node to set.
-
getSize
public int getSize()- Returns:
- Returns the size.
-
setSize
public void setSize(int size) - Parameters:
size
- The size to set.
-