<< Click to Display Table of Contents >> Navigation: Reference Manual > Node values > DSL_expectedUtility |
Header file: valexpectedutility.h
class DSL_expectedUtility : public DSL_nodeVal
DSL_expectedUtility class is derived from derived from DSL_nodeVal. It provides a value implementation for utility nodes, which have definitions of DSL_utility type.
The value is represented by a DSL_Dmatrix member object, which contains expected utilitities.
virtual int GetType() const;
Overridden method from DSL_nodeVal. Returns DSL_EXPECTEDUTILITY.
const DSL_Dmatrix& GetExpectedUtilities() const;
Returns a reference to the matrix of expected utilities. Note that you do not need to cast DSL_nodeVal pointer obtained from DSL_node::Val to DSL_expectedUtilities in order to get the expected utilities. The methods GetMatrix and GetValue (declared in DSL_nodeVal) will return a pointer to the same DSL_Dmatrix object. GetExpectedUtilities is defined to provide a method with a name closely reflecting the Bayesian network terminology.
The matrix can be multi-dimensional if the node has value indexing parents. Indexing parents are are unobserved decision nodes that precede the current node or unobserved chance nodes that should have been observed. The last dimension of the matrix (or its only dimension, if there are no value indexing parents) is always equal to one.
double GetMinimumUtility() const;
double GetMaximumUtility() const;
Return minimum or maximum expected utility.