edu.ucla.belief.dtree
Class DtreeNode

Object
  extended by DtreeNode
Direct Known Subclasses:
DtreeNodeInternal, DtreeNodeLeaf

public abstract class DtreeNode
extends Object


Constructor Summary
DtreeNode(Collection vars)
           
 
Method Summary
 boolean containsVar(Object var)
           
 Collection getCluster()
          The Cluster is defined as: (1) vars(t) if it is a leaf node, or (2) cutset (union) context otherwise.
 Collection getContext()
          The context is defined as vars (intersect) acutset.
 Collection getCutset()
          The cutset is defined as: (1) varsL (intersect) varsR - acutset if it is a leaf node, or (2) empty Collection otherwise.
abstract  int getHeight()
          This height is calculated by how many levels of nodes there are, not by how many edges there are between them.
abstract  Collection getLargestCluster(int largest)
          Returns the largest cluster (actually the first it finds which is at least as big as the parameter largest).
abstract  int getNumberInternalNodes()
          Returns the number of internal nodes including (possibly) this one and all below it.
abstract  int getNumberLeafNodes()
          Returns the number of leaf nodes including (possibly) this one and all below it.
 int getNumberNodes()
          Returns the number of DtreeNodes including this one and all below it.
 Collection getVars()
          Returns a nonModifiableCollection containing the variables below this node.
 int hashCodeSpecial()
           
abstract  boolean isLeaf()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DtreeNode

public DtreeNode(Collection vars)
Method Detail

isLeaf

public abstract boolean isLeaf()

containsVar

public boolean containsVar(Object var)

getVars

public Collection getVars()
Returns a nonModifiableCollection containing the variables below this node.


hashCodeSpecial

public int hashCodeSpecial()

getCutset

public Collection getCutset()
The cutset is defined as: (1) varsL (intersect) varsR - acutset if it is a leaf node, or (2) empty Collection otherwise.

Returns a nonModifiableCollection.

Requires the dtree to have been populated.


getContext

public Collection getContext()
The context is defined as vars (intersect) acutset.

Returns a nonModifiableCollection.

Requires the dtree to have been populated.


getCluster

public Collection getCluster()
The Cluster is defined as: (1) vars(t) if it is a leaf node, or (2) cutset (union) context otherwise.

Returns a copy of the cluster, user can modify as they like.

Requires the dtree to have been populated.


getNumberNodes

public int getNumberNodes()
Returns the number of DtreeNodes including this one and all below it.


getNumberInternalNodes

public abstract int getNumberInternalNodes()
Returns the number of internal nodes including (possibly) this one and all below it.


getNumberLeafNodes

public abstract int getNumberLeafNodes()
Returns the number of leaf nodes including (possibly) this one and all below it.


getLargestCluster

public abstract Collection getLargestCluster(int largest)
Returns the largest cluster (actually the first it finds which is at least as big as the parameter largest).


getHeight

public abstract int getHeight()
This height is calculated by how many levels of nodes there are, not by how many edges there are between them. (e.g. leaf nodes have height of 1, their parents have a height of 2...)



Copyright 2010 UCLA Automated Reasoning Group