GClasses
GClasses::GBNNode Class Referenceabstract

Detailed Description

The base class of all nodes in a Bayesian belief network.

#include <GBayesianNetwork.h>

Inheritance diagram for GClasses::GBNNode:
GClasses::GBNConstant GClasses::GBNMath GClasses::GBNProduct GClasses::GBNSum GClasses::GBNVariable GClasses::GBNCategorical GClasses::GBNMetropolisNode GClasses::GBNBeta GClasses::GBNExponential GClasses::GBNGamma GClasses::GBNInverseGamma GClasses::GBNLogNormal GClasses::GBNNormal GClasses::GBNPareto GClasses::GBNPoisson GClasses::GBNUniformContinuous GClasses::GBNUniformDiscrete

Public Member Functions

 GBNNode ()
 
virtual ~GBNNode ()
 
virtual double currentValue ()=0
 Returns the current value of this node. If this node represents a random variable, then it returns the value most-recently sampled from its distribution. More...
 
virtual void onNewChild (GBNVariable *pChild)=0
 This method is called when this node is added as the parent to pChild. It gives this node a chance to link back to the child if needed. More...
 

Protected Attributes

bool m_observed
 
double m_observedValue
 

Constructor & Destructor Documentation

GClasses::GBNNode::GBNNode ( )
virtual GClasses::GBNNode::~GBNNode ( )
virtual

Member Function Documentation

virtual double GClasses::GBNNode::currentValue ( )
pure virtual

Returns the current value of this node. If this node represents a random variable, then it returns the value most-recently sampled from its distribution.

Implemented in GClasses::GBNMetropolisNode, GClasses::GBNCategorical, GClasses::GBNVariable, GClasses::GBNMath, GClasses::GBNProduct, GClasses::GBNSum, and GClasses::GBNConstant.

virtual void GClasses::GBNNode::onNewChild ( GBNVariable pChild)
pure virtual

This method is called when this node is added as the parent to pChild. It gives this node a chance to link back to the child if needed.

Implemented in GClasses::GBNVariable, GClasses::GBNMath, GClasses::GBNProduct, GClasses::GBNSum, and GClasses::GBNConstant.

Member Data Documentation

bool GClasses::GBNNode::m_observed
protected
double GClasses::GBNNode::m_observedValue
protected