class DiscreteDecisionNode : public Node

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

Inheritance:


Public Methods

void addParent(DiscreteChanceNode *parent) throw( HAPI::ExceptionHugin )
Add parent as a new parent of this node
void addParent(DiscreteDecisionNode *parent) throw( HAPI::ExceptionHugin )
Add parent as a new parent of this node
void enterFinding(int state, double value) throw( ExceptionHugin )
This method specifies a finding value for the specified state and all other states are not effected
int getCaseState(long index) throw(HAPI::ExceptionHugin)
Retrieve the state value of this node associated with the case index
virtual Category getCategory() throw()
Return the node category
NodeList getChildren() const throw( HAPI::ExceptionHugin )
Return a NodeList containing references to the children of this node
double getEnteredFinding(int state) const throw( ExceptionHugin )
Retrieve the finding currently registrered at this node for the specified state
double getExpectedUtility(int state) const throw( ExceptionHugin )
Return the expected utility associated with the specified action (state)
virtual Kind getKind() throw()
Return the node kind
int getNumberOfStates() const throw()
Return the number of states in this node
double getPropagatedFinding(int state) const throw( ExceptionHugin )
Retrieve the finding value incorporated
std::string getStateLabel(int state) const throw()
Return the label of state
bool isEvidenceEntered()
Return whether or not evidence is entered into this node
bool isEvidencePropagated()
Return whether or not evidence has been propagated from this node
void removeParent(DiscreteChanceNode *parent) throw( HAPI::ExceptionHugin )
Remove the directed link between parent and this node
void removeParent(DiscreteDecisionNode *parent) throw( HAPI::ExceptionHugin )
Remove the directed link between parent and this node
void retractFindings() throw( ExceptionHugin )
Retract all findings for this node
void selectState(int state) throw( ExceptionHugin )
Select the specified state of this node
void setCaseState(long index, int state) throw(HAPI::ExceptionHugin)
Specify the case state of this node associated with case index to be state
void setStateLabel(int state, std::string& statelabel) throw(HAPI::ExceptionHugin)
Set the state label of the node
void setStateLabel(int state, char *statelabel) throw(HAPI::ExceptionHugin)
Set the state label of the node
void unsetCase(long index)
Specify that the value of this node for case index is unknown

Inherited from Node:

Public Methods

std::string getAttribute(std::string& key) const throw(HAPI::ExceptionHugin)
Domain* getDomain() const throw(HAPI::ExceptionHugin)
JunctionTree* getJunctionTree() const throw(HAPI::ExceptionHugin)
std::string getLabel() const throw(HAPI::ExceptionHugin)
Model* getModel() throw(HAPI::ExceptionHugin)
std::string getName() const throw(HAPI::ExceptionHugin)
NodeList getParents() const throw(HAPI::ExceptionHugin)
std::pair <long, long> getPosition() const throw(HAPI::ExceptionHugin)
void* getUserData() throw(HAPI::ExceptionHugin)
Constraint getEdgeConstraint( Node *bNode )
void setEdgeConstraint( Node *bNode, Constraint C )
void generateTable() throw(HAPI::ExceptionHugin )
std::vector <Attribute*> Node::getAttributes() throw(HAPI::ExceptionHugin )
void setAttribute(std::string& key, std::string& value) throw(HAPI::ExceptionHugin)
void setLabel(char* label) throw(HAPI::ExceptionHugin)
void setLabel(std::string& label) throw(HAPI::ExceptionHugin)
void setName(char *name) throw(HAPI::ExceptionHugin)
void setName(std::string& name) throw(HAPI::ExceptionHugin)
void setPosition(long x, long y) throw(HAPI::ExceptionHugin)
void setPosition(std::pair<long, long> pos) throw(HAPI::ExceptionHugin)
void setUserData(void *) throw(HAPI::ExceptionHugin)
Domain* getHomeDomain() const throw(ExceptionHugin)
Class* getHomeClass() const throw(ExceptionHugin)
void addToInputs() throw(ExceptionHugin)
void addToOutputs() throw(ExceptionHugin)
void removeFromInputs() throw(ExceptionHugin)
void removeFromOutputs() throw(ExceptionHugin)
Node* getInstance() throw(ExceptionHugin)
Node* getMaster() throw(ExceptionHugin)
NodeList getSource() throw(ExceptionHugin)

Documentation

The discrete decision node. Base class for all decision nodes.
void addParent(DiscreteChanceNode *parent) throw( HAPI::ExceptionHugin )
Add parent as a new parent of this node. That is, add a directed link from parent to this node.

Parameters:
parent - DiscreteChanceNode*

void addParent(DiscreteDecisionNode *parent) throw( HAPI::ExceptionHugin )
Add parent as a new parent of this node. That is, add a directed link from parent to this node.

Parameters:
parent - DiscreteDecisionNode*

void enterFinding(int state, double value) throw( ExceptionHugin )
This method specifies a finding value for the specified state and all other states are not effected. <P>

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

int getCaseState(long index) throw(HAPI::ExceptionHugin)
Retrieve the state value of this node associated with the case index

virtual Category getCategory() throw()
Return the node category

NodeList getChildren() const throw( HAPI::ExceptionHugin )
Return a NodeList containing references to the children of this node. If no children exist, an empty NodeList is returned.

Returns:
NodeList

double getEnteredFinding(int state) const throw( ExceptionHugin )
Retrieve the finding currently registrered at this node for the specified state.

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

double getExpectedUtility(int state) const throw( ExceptionHugin )
Return the expected utility associated with the specified action (state).

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

virtual Kind getKind() throw()
Return the node kind

int getNumberOfStates() const throw()
Return the number of states in this node. The states are numbered from 0 to N-1.

Returns:
int

double getPropagatedFinding(int state) const throw( ExceptionHugin )
Retrieve the finding value incorporated. This value is incorporated within the current junction tree potentials for state of this node.

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

std::string getStateLabel(int state) const throw()
Return the label of state. 0 < state < N, where N is the number of states in the node.

Returns:
Standard C++ Library string.

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

Returns:
Boolean.

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

Returns:
Boolean.

void removeParent(DiscreteChanceNode *parent) throw( HAPI::ExceptionHugin )
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 removeParent(DiscreteDecisionNode *parent) throw( HAPI::ExceptionHugin )
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 retractFindings() throw( ExceptionHugin )
Retract all findings for this node. This is equivalent to setting the finding value to 1 for all states of this node.

void selectState(int state) throw( ExceptionHugin )
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 setCaseState(long index, int state) throw(HAPI::ExceptionHugin)
Specify the case state of this node associated with case index to be state.

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

void setStateLabel(int state, std::string& statelabel) throw(HAPI::ExceptionHugin)
Set the state label of the node.

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

void setStateLabel(int state, char *statelabel) throw(HAPI::ExceptionHugin)
Set the state label of the node.

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

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

Parameters:
index - long.


Direct child classes:
NumberedDDNode
LabelledDDNode
IntervalDDNode
BooleanDDNode

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de