DSL_cpt

<< Click to Display Table of Contents >>

Navigation:  Reference Manual > Node definitions >

DSL_cpt

Header file: defcpt.h

class DSL_cpt : public DSL_discDef

DSL_cpt provides implementation for CPT nodes, inheriting most of the functionality from DSL_discDef. Conditional probabilities are stored in the DSL_Dmatrix object.


virtual int GetType() const;

Overridden method from DSL_nodeDef. Returns DSL_CPT.


virtual const char* GetTypeName() const;

Overridden method from DSL_nodeDef. Returns "CPT".


const DSL_Dmatrix& GetProbabilities() const;

Returns a reference to a matrix of conditional probabilities. Note that you do not need to cast DSL_nodeDef pointer obtained from DSL_node::Def to DSL_cpt in order to get the probabilities. The methods GetMatrix and GetDefinition (declared in DSL_nodeDef) will return a pointer to the same DSL_Dmatrix object. GetProbabilities is defined to provide a method with a name closely reflecting Bayesian network terminology.