JGraph
v5.13.0.4


com.jgraph.algebra
Class JGraphUnionFind.Node

java.lang.Object
  extended by com.jgraph.algebra.JGraphUnionFind.Node
Enclosing class:
JGraphUnionFind

public class JGraphUnionFind.Node
extends java.lang.Object

A class that defines the identity of a set.


Field Summary
protected  JGraphUnionFind.Node parent
          Reference to the parent node.
protected  int size
          The size of the tree.
 
Constructor Summary
JGraphUnionFind.Node()
           
 
Method Summary
 JGraphUnionFind.Node getParent()
           
 int getSize()
           
 void setParent(JGraphUnionFind.Node parent)
           
 void setSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected JGraphUnionFind.Node parent
Reference to the parent node. Root nodes point to themselfes.


size

protected int size
The size of the tree. Initial value is 1.

Constructor Detail

JGraphUnionFind.Node

public JGraphUnionFind.Node()
Method Detail

getParent

public JGraphUnionFind.Node getParent()
Returns:
Returns the parent node

setParent

public void setParent(JGraphUnionFind.Node parent)
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.

JGraph
v5.13.0.4


Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.