Class Cluster

java.lang.Object
  extended by Cluster
Direct Known Subclasses:
ClusterNode, CPTNode, InstanciateNode

public abstract class Cluster
extends java.lang.Object

A cluster used in the bucket-tree algorithm. Note that clusters and variables in the Bayesian network have a one-to-one mapping, so the ID of a cluster is the same as the ID of the corresponding variable.


Field Summary
(package private)  int id
          ID of the cluster.
(package private)  VArray instAry
          Bit array that indicates the existences of the instanciation nodes in the same bucket.
(package private)  VArray modeAry
          Bit array that indicates the input/output modes of the variables in the cluster.
(package private)  int offset
          Temporary variable used for breaking a loop of input/output dependency
(package private)  VArray varAry
          Bit array that indicates the variables in the cluster.
(package private)  int width
          The width of the cluster.
 
Constructor Summary
Cluster()
           
 
Method Summary
protected  int computeWidth(VArray va)
           
 int getId()
           
 VArray getInstAry()
           
 VArray getModeAry()
           
 int getOffset()
           
 VArray getVarAry()
           
 int getWidth()
           
 void setInstAry(VArray ia)
           
 void setModeAry(VArray m)
           
 void setOffset(int o)
           
abstract  java.lang.String toPrismString()
           
abstract  java.lang.String toPrismString2()
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

int id
ID of the cluster.


varAry

VArray varAry
Bit array that indicates the variables in the cluster. That is, true (resp. false) means the variable is (resp. is not) included in the cluster.


width

int width
The width of the cluster. This is exactly the number of true bits in varAry.


modeAry

VArray modeAry
Bit array that indicates the input/output modes of the variables in the cluster. true means the input (+) mode, and false means the output (-) mode.


instAry

VArray instAry
Bit array that indicates the existences of the instanciation nodes in the same bucket.


offset

int offset
Temporary variable used for breaking a loop of input/output dependency

Constructor Detail

Cluster

public Cluster()
Method Detail

getId

public int getId()

getVarAry

public VArray getVarAry()

getWidth

public int getWidth()

setModeAry

public void setModeAry(VArray m)

setInstAry

public void setInstAry(VArray ia)

getModeAry

public VArray getModeAry()

getInstAry

public VArray getInstAry()

setOffset

public void setOffset(int o)

getOffset

public int getOffset()

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object

toPrismString

public abstract java.lang.String toPrismString()

toPrismString2

public abstract java.lang.String toPrismString2()

computeWidth

protected int computeWidth(VArray va)