com.jgraph.algebra

Class JGraphUnionFind.Node

public class JGraphUnionFind.Node extends Object

A class that defines the identity of a set.
Field Summary
protected JGraphUnionFind.Nodeparent
Reference to the parent node.
protected intsize
The size of the tree.
Method Summary
JGraphUnionFind.NodegetParent()
intgetSize()
voidsetParent(JGraphUnionFind.Node parent)
voidsetSize(int size)

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.

Method Detail

getParent

public JGraphUnionFind.Node getParent()

Returns: Returns the parent node

getSize

public int getSize()

Returns: Returns the size.

setParent

public void setParent(JGraphUnionFind.Node parent)

Parameters: parent the parent node to set

setSize

public void setSize(int size)

Parameters: size The size to set.

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