Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

HAPI::DiscreteDecisionNode Class Reference

Inheritance diagram for HAPI::DiscreteDecisionNode:

HAPI::Node HAPI::BooleanDDNode HAPI::IntervalDDNode HAPI::LabelledDDNode HAPI::NumberedDDNode List of all members.

Detailed Description

The discrete decision node. Base class for all decision nodes.


Public Member Functions

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 (DiscreteDecisionNode *parent)
 Add parent as a new parent of this node.

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

void switchParent (DiscreteDecisionNode *oldParent, DiscreteDecisionNode *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 enterFinding (size_t state, Number value)
 This method specifies a finding value for the specified state and all other states are not effected.

size_t getCaseState (size_t index) const
 Retrieve the state value of this node associated with the case index.

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

Category getCategory () const
 Return the node category.

Kind getKind () const
 Return the node kind.

Number getEnteredFinding (size_t state) const
 Retrieve the finding currently registrered at this node for the specified state.

Number getExpectedUtility (size_t state) const
 Return the expected utility associated with the specified action (state).

size_t getNumberOfStates () const
 Return the number of states in this node.

Number getPropagatedFinding (size_t state) const
 Retrieve the finding value incorporated.

std::string getStateLabel (size_t state) const
 Return the label of state.

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 retractFindings ()
 Retract all findings for this node.

void selectState (size_t state)
 Select the specified state of this node.

void setCaseState (size_t index, size_t state)
 Specify the case state of this node associated with case index to be state.

void setStateLabel (size_t state, const std::string &statelabel)
 Set the state label of the node.

void setStateLabel (size_t state, const char *statelabel)
 Set the state label of the node.

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


Member Function Documentation

void HAPI::DiscreteDecisionNode::addParent DiscreteDecisionNode *  parent  ) 
 

Add parent as a new parent of this node.

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

Parameters:
parent DiscreteDecisionNode*

void HAPI::DiscreteDecisionNode::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::DiscreteDecisionNode::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::DiscreteDecisionNode::enterFinding size_t  state,
Number  value
 

This method specifies a finding value for the specified state and all other states are not effected.

Parameters:
state An integer designating which state to be selected. States are numbered consecutively from 0 and upwards.
value A non-negative real number as the finding value.

NodeList HAPI::DiscreteDecisionNode::getChildren  )  const
 

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

If no children exist, an empty NodeList is returned.

Returns:
NodeList

Number HAPI::DiscreteDecisionNode::getEnteredFinding size_t  state  )  const
 

Retrieve the finding currently registrered at this node for the specified state.

Parameters:
state An integer designating the state to be examined.
Returns:
A double-precision real number expressing the entered finding.

Number HAPI::DiscreteDecisionNode::getExpectedUtility size_t  state  )  const
 

Return the expected utility associated with the specified action (state).

Parameters:
state An interger value designating which state to examine.
Returns:
A double-precision floating-point value expressing the expected utility associated with state.

size_t HAPI::DiscreteDecisionNode::getNumberOfStates  )  const
 

Return the number of states in this node.

The states are numbered from 0 to N-1.

Returns:
size_t

NodeList HAPI::DiscreteDecisionNode::getParents  )  const
 

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

If no parents exist, an empty NodeList is returned.

Returns:
NodeList

Number HAPI::DiscreteDecisionNode::getPropagatedFinding size_t  state  )  const
 

Retrieve the finding value incorporated.

This value is incorporated within the current junction tree potentials for state of this node.

Parameters:
state An integer designating the state to be examined.
Returns:
A double-precision real number expressing the propagated finding.

std::string HAPI::DiscreteDecisionNode::getStateLabel size_t  state  )  const
 

Return the label of state.

0 < state < N, where N is the number of states in the node.

Returns:
Standard C++ Library string.

bool HAPI::DiscreteDecisionNode::isEvidenceEntered  )  const
 

Return whether or not evidence is entered into this node.

Returns:
Boolean.

bool HAPI::DiscreteDecisionNode::isEvidencePropagated  )  const
 

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

Returns:
Boolean.

void HAPI::DiscreteDecisionNode::removeParent DiscreteDecisionNode *  parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the updated table will be the portion of the old table that corresponds to parent being in its first state.

Parameters:
parent Pointer to the DiscreteDecisionNode that will be removed as parent.

void HAPI::DiscreteDecisionNode::removeParent DiscreteChanceNode parent  ) 
 

Remove the directed link between parent and this node.

The table (if any) will be updated such that the updated table will be the portion of the old table that corresponds to parent being in its first state.

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

void HAPI::DiscreteDecisionNode::retractFindings  ) 
 

Retract all findings for this node.

This is equivalent to setting the finding value to 1 for all states of this node.

void HAPI::DiscreteDecisionNode::selectState size_t  state  ) 
 

Select the specified state of this node.

This is equivalent to specifying the finding value 1 for state and 0 for all other states.

Parameters:
state An integer designating which state to be selected. States are numbered consecutively from 0 and upwards.

void HAPI::DiscreteDecisionNode::setCaseState size_t  index,
size_t  state
 

Specify the case state of this node associated with case index to be state.

Parameters:
index The case index.
state The node state.

void HAPI::DiscreteDecisionNode::setStateLabel size_t  state,
const char *  statelabel
 

Set the state label of the node.

Parameters:
state size_t - The state number.
statelabel - The desired state label.

void HAPI::DiscreteDecisionNode::setStateLabel size_t  state,
const std::string &  statelabel
 

Set the state label of the node.

Parameters:
state size_t - The state number.
statelabel - The desired state label.

void HAPI::DiscreteDecisionNode::switchParent DiscreteDecisionNode *  oldParent,
DiscreteDecisionNode *  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::DiscreteDecisionNode::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::DiscreteDecisionNode::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