Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering.biclustering
Class BiclusteringTree

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.clustering.biclustering.BiclusteringTree

public class BiclusteringTree
extends Object

Provides a treeStructure with BitSets as nodes and Integers as edges. Every node of the tree has a path to the root, defined trough the edges leading from the node to the root. This class is used by PClustering as a clusterTree, the edges representing columns and the nodes representing rows. Every path from the root to some node of predefined depth, forms a bicluster with that node.

Author:
Noemi Andor

Field Summary
private  ArrayList<BiclusteringTree> children
          The children of this node.
private  ArrayList<Integer> edges
          The edges of this node.
private  BitSet node
          The treeNode currently worked at.
private  BiclusteringTree parent
          The parent node of this node.
private  int placeToAdd
          Specifies the position in which a child should be added.
private  int rootEdge
          The edge leading from the previous node to the current node.
private  BitSet rootEdges
          The edges leading from the current node to the root of the tree.
 
Constructor Summary
BiclusteringTree()
          Constructor creating a new RootTree-Object.
 
Method Summary
private  void addEdge(int edge)
          Adds an edge dependent on its value in ascending order to the List of edges, if it does not already contain this edge.
private  BiclusteringTree getChild(int root)
          Getter for the child which has the node as root, whose rootEdge is parameter root.
 int getChildCount()
          Getter for the number of children of this tree.
 ArrayList<BiclusteringTree> getChildren()
          Getter for the children of this Object.
 BitSet getEdgesToRoot()
          Getter for the edges leading from this node to the root of the tree.
 BitSet getNode()
          Getter
 BiclusteringTree getParent()
           
 void insertTree(BitSet edge, BitSet node, int initialEdge)
          Inserts a new node to the tree by following the edges of the tree given by parameter edge.
 void setNode(BitSet newNode)
          Expands this node with the entries of newNode.
private  void setRootEdge(int edge)
          Adds edge to the list of rootEdges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

placeToAdd

private int placeToAdd
Specifies the position in which a child should be added.


node

private BitSet node
The treeNode currently worked at.


rootEdge

private int rootEdge
The edge leading from the previous node to the current node.


rootEdges

private BitSet rootEdges
The edges leading from the current node to the root of the tree.


edges

private ArrayList<Integer> edges
The edges of this node.


children

private ArrayList<BiclusteringTree> children
The children of this node.


parent

private BiclusteringTree parent
The parent node of this node.

Constructor Detail

BiclusteringTree

public BiclusteringTree()
Constructor creating a new RootTree-Object.

Method Detail

getChildren

public ArrayList<BiclusteringTree> getChildren()
Getter for the children of this Object.

Returns:
the childrenTrees of this object.

addEdge

private void addEdge(int edge)
Adds an edge dependent on its value in ascending order to the List of edges, if it does not already contain this edge. If the list is empty, the edge is added on position 0 of the list.

Parameters:
edge - new edge to be added to the list of edges.

setNode

public void setNode(BitSet newNode)
Expands this node with the entries of newNode.

Parameters:
newNode - new node to be added to this node.

getEdgesToRoot

public BitSet getEdgesToRoot()
Getter for the edges leading from this node to the root of the tree.

Returns:
BitSet of edges leading to the root.

getChildCount

public int getChildCount()
Getter for the number of children of this tree.

Returns:
the number of children of this tree.

getNode

public BitSet getNode()
Getter

Returns:
the node of this tree.

setRootEdge

private void setRootEdge(int edge)
Adds edge to the list of rootEdges.

Parameters:
edge - new edge to be added to the rootEdges.

getChild

private BiclusteringTree getChild(int root)
Getter for the child which has the node as root, whose rootEdge is parameter root.

Parameters:
root - edge which may lead to the rootNode of some child of this tree.
Returns:
the child with the rootNode which has the parameter root as origin.

getParent

public BiclusteringTree getParent()
Returns:
the parent of this tree.

insertTree

public void insertTree(BitSet edge,
                       BitSet node,
                       int initialEdge)
Inserts a new node to the tree by following the edges of the tree given by parameter edge. If the tree does not contain the edgePath given by edge, this path is created. The node is inserted at the and of the path given by edge.

Parameters:
edge - a BitSet of edges indicating the path on which end the node should be inserted
node - node to be added to the tree
initialEdge - rootEdge leading to the current node.

Release 0.1 (2008-07-10_1838)