Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

HAPI::ContinuousChanceNode Class Reference

Inheritance diagram for HAPI::ContinuousChanceNode:

HAPI::Node List of all members.

Detailed Description

The Continuous chance node.

This node represents continuous chance nodes with (conditional) Gaussian distributions. Continuous chance nodes are also sometimes called CG nodes (CG for conditional Gaussian).


Public Member Functions

 ContinuousChanceNode (Domain *dom)
 Create a new ContinuousChanceNode in the given Domain.

 ContinuousChanceNode (Class *dom)
 Create a new ContinuousChanceNode in the given Class.

void addParent (DiscreteChanceNode *parent)
 Add parent as a new parent of this node.

void removeParent (DiscreteChanceNode *parent)
 Remove the directed link between parent and this node.

void switchParent (DiscreteChanceNode *oldParent, DiscreteChanceNode *newParent)
 Substitute a new parent for an old parent.

void addParent (ContinuousChanceNode *parent)
 Add parent as a new parent of this node.

void removeParent (ContinuousChanceNode *parent)
 Remove the directed link between parent and this node.

void switchParent (ContinuousChanceNode *oldParent, ContinuousChanceNode *newParent)
 Substitute a new parent for an old parent.

NodeList getParents () const
 Return a NodeList with references to the parents of this node.

NodeList getChildren () const
 Return a NodeList containing references to the children of this node.

void reverseEdge (ContinuousChanceNode *neighbor)
 Reverse the edge between this node and the specified neighbor.

void enterValue (double value)
 Specify that this continuous node has the value value.

double getCaseValue (size_t index) const
 Retrieve the value of this node assoociated with case index.

Category getCategory () const
 Return the node category.

Kind getKind () const
 Return the node kind.

CGDistributiongetCGDistribution ()
 Get the CG distribution associated with this node.

TablegetDistribution () const
 Compute the distribution for this continuous node.

double getEnteredValue () const
 Retrieve the entered value for this node.

double getMean () const
 Return the mean of the marginal distribution of this node.

double getPropagatedValue () const
 Retrieve the finding value.

double getVariance () const
 Return the variance of the marginal distribution of this node.

bool isEvidenceEntered () const
 Return whether or not evidence is entered into this node.

bool isEvidencePropagated () const
 Return whether or not evidence has been propagated from this node.

void retractValue ()
 Retract the entered value for this node.

void setCaseValue (size_t index, double value)
 Set the value associate with this node in case index to value.

void unsetCase (size_t index)
 Specify that the value of this node for case index is unknown.

bool caseIsSet (size_t index) const
 Test whether the value of this node in case index currently is set.

double getSampledValue () const
 Returns the value of this ContinuousChanceNode for the configuration generated by the most recent call to Domain::simulate().


Member Function Documentation

void HAPI::ContinuousChanceNode::addParent ContinuousChanceNode *  parent  ) 
 

Add parent as a new parent of this node.

That is, add a directed link from parent to this node.

Parameters:
parent ContinuousChanceNode*

void HAPI::ContinuousChanceNode::addParent DiscreteChanceNode parent  ) 
 

Add parent as a new parent of this node.

That is, add a directed link from parent to this node.

Parameters:
parent DiscreteChanceNode*

bool HAPI::ContinuousChanceNode::caseIsSet size_t  index  )  const
 

Test whether the value of this node in case index currently is set.

Parameters:
index Case index.
Returns:
boolean.

void HAPI::ContinuousChanceNode::enterValue double  value  ) 
 

Specify that this continuous node has the value value.

Parameters:
value A real number as the finding value.

double HAPI::ContinuousChanceNode::getCaseValue size_t  index  )  const
 

Retrieve the value of this node assoociated with case index.

Parameters:
index Case index.

CGDistribution* HAPI::ContinuousChanceNode::getCGDistribution  ) 
 

Get the CG distribution associated with this node.

Returns:
CGDistribution*

NodeList HAPI::ContinuousChanceNode::getChildren  )  const
 

Return a NodeList containing references to the children of this node.

If no children exist, an empty NodeList is returned.

Returns:
NodeList

Table* HAPI::ContinuousChanceNode::getDistribution  )  const
 

Compute the distribution for this continuous node.

The distribution for a CG node is in general a mixture of several Gaussian distributions. ContinuousChanceNode::getDistribution () really computes a joint distribution of this node and a set of discrete nodes. These discrete nodes are chosen such that the computed marginal is a strong marginal, but it is not necessarily minimal.

Returns:
Table* - Pointer to a Table holding a strong marginal of this node and a set of discrete nodes.

double HAPI::ContinuousChanceNode::getEnteredValue  )  const
 

Retrieve the entered value for this node.

Returns:
A double-precision real number expressing the entered value.

Kind HAPI::ContinuousChanceNode::getKind  )  const [inline, virtual]
 

Return the node kind.

Returns:
Kind

Implements HAPI::Node.

double HAPI::ContinuousChanceNode::getMean  )  const
 

Return the mean of the marginal distribution of this node.

Returns:
A double-precision real number expressing the mean.

NodeList HAPI::ContinuousChanceNode::getParents  )  const
 

Return a NodeList with references to the parents of this node.

If no parents exist, an empty NodeList is returned.

Returns:
NodeList

double HAPI::ContinuousChanceNode::getPropagatedValue  )  const
 

Retrieve the finding value.

That is, retrieve the finding value incorporated within the current junction tree potentials for state of this node.

Returns:
A double-precision real number expressing the propagated value.

double HAPI::ContinuousChanceNode::getSampledValue  )  const
 

Returns the value of this ContinuousChanceNode for the configuration generated by the most recent call to Domain::simulate().

Returns:
A double - the value sampled for this during the last invocation of simulate () on the Domain of this.
See also:
Domain::simulate

double HAPI::ContinuousChanceNode::getVariance  )  const
 

Return the variance of the marginal distribution of this node.

Returns:
A double-precision real number expressing the variance.

bool HAPI::ContinuousChanceNode::isEvidenceEntered  )  const
 

Return whether or not evidence is entered into this node.

Returns:
Boolean.

bool HAPI::ContinuousChanceNode::isEvidencePropagated  )  const
 

Return whether or not evidence has been propagated from this node.

Returns:
Boolean.

void HAPI::ContinuousChanceNode::removeParent ContinuousChanceNode *  parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the Beta(i)-parameters will be deleted from the table.

Parameters:
parent Reference to the ContinuousChanceNode that will be removed as parent.

void HAPI::ContinuousChanceNode::removeParent DiscreteChanceNode parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the Beta(i)-parameters will be deleted from the table.

Parameters:
parent Reference to the DiscreteChanceNode that will be removed as parent.

void HAPI::ContinuousChanceNode::reverseEdge ContinuousChanceNode *  neighbor  ) 
 

Reverse the edge between this node and the specified neighbor.

Parameters:
neighbor ContinuousChanceNode*

void HAPI::ContinuousChanceNode::switchParent DiscreteChanceNode oldParent,
DiscreteChanceNode newParent
 

Substitute a new parent for an old parent.

The new parent must be compatible with the old parent: This implies that it must be of the same class, have the same number of states, etc.

void HAPI::ContinuousChanceNode::unsetCase size_t  index  ) 
 

Specify that the value of this node for case index is unknown.

Parameters:
index long.


Copyright Hugin Expert A/S 1993-2004