com.cra.bnet.engine
Class MultiplyNode

java.lang.Object
  |
  +--com.cra.bnet.engine.AbstractNode
        |
        +--com.cra.bnet.engine.AbstractQueueNode
              |
              +--com.cra.bnet.engine.MultiplyNode
All Implemented Interfaces:
AmgNode, QueueNode

public final class MultiplyNode
extends AbstractQueueNode

Represents a multiplication node in the AMG.


Field Summary
 
Fields inherited from class com.cra.bnet.engine.AbstractNode
derivativeName, name, valueName
 
Constructor Summary
MultiplyNode(Set cluster, int clusterIndex, int instantiationIndex)
          Creates a new MultiplyNode using the specified cluster index and instantiation index.
 
Method Summary
 boolean addChild(AddNode node)
          Adds the specified addition node to this node's child list.
 boolean addChild(CptEntryNode node)
          Adds the specified cpt entry node to this node's child list.
 boolean addChild(EvidenceNode node)
          Adds the specified evidence node to this node's child list.
 boolean addParent(AddNode node)
          Adds the specified addition node to this node's parent list.
protected  double computeValue()
          Computes the value for this node.
protected  String createName()
           
 Set getCluster()
          Returns this node's cluster.
 int getClusterIndex()
          Returns this node's cluster index.
 String getDerivativeName()
          Returns this node's derivative name.
 int getInstantiationIndex()
          Returns this node's instantiation index.
 String getValueName()
          Returns this node's value name.
 String toString()
          Returns a string representation of this node.
 
Methods inherited from class com.cra.bnet.engine.AbstractQueueNode
isOnQueue, setOnQueue
 
Methods inherited from class com.cra.bnet.engine.AbstractNode
addChild, addParent, computeDerivative, getChildren, getDerivative, getName, getParents, getValue, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.cra.bnet.engine.AmgNode
getChildren, getDerivative, getName, getParents, getValue, reset
 

Constructor Detail

MultiplyNode

public MultiplyNode(Set cluster,
                    int clusterIndex,
                    int instantiationIndex)
Creates a new MultiplyNode using the specified cluster index and instantiation index.

Parameters:
clusterIndex - cluster index.
instantiationIndex - instantiation index.
Method Detail

addChild

public boolean addChild(AddNode node)
Adds the specified addition node to this node's child list.

Parameters:
node - child node.
Returns:
true if the child node was added and false if it was not.

addChild

public boolean addChild(CptEntryNode node)
Adds the specified cpt entry node to this node's child list.

Parameters:
node - child node.
Returns:
true if the child node was added and false if it was not.

addChild

public boolean addChild(EvidenceNode node)
Adds the specified evidence node to this node's child list.

Parameters:
node - child node.
Returns:
true if the child node was added and false if it was not.

addParent

public boolean addParent(AddNode node)
Adds the specified addition node to this node's parent list.

Parameters:
node - parent node.
Returns:
true if the parent node was added and false if it was not.

getCluster

public Set getCluster()
Returns this node's cluster.

Returns:
this node's cluster.

getClusterIndex

public int getClusterIndex()
Returns this node's cluster index.

Returns:
this node's cluster index.

getInstantiationIndex

public int getInstantiationIndex()
Returns this node's instantiation index.

Returns:
this node's instantiation index.

createName

protected String createName()
Specified by:
createName in class AbstractNode

getDerivativeName

public String getDerivativeName()
Description copied from interface: AmgNode
Returns this node's derivative name.

Specified by:
getDerivativeName in interface AmgNode
Overrides:
getDerivativeName in class AbstractNode
Returns:
this node's derivative name.

getValueName

public String getValueName()
Description copied from interface: AmgNode
Returns this node's value name.

Specified by:
getValueName in interface AmgNode
Overrides:
getValueName in class AbstractNode
Returns:
this node's value name.

computeValue

protected double computeValue()
Description copied from class: AbstractNode
Computes the value for this node.

Specified by:
computeValue in class AbstractNode
Returns:
the value for this node.

toString

public String toString()
Returns a string representation of this node.

Overrides:
toString in class Object
Returns:
a string representation of this node.