GClasses
GClasses::GBNSum Class Reference

Detailed Description

A node in a belief network that always returns the sum of its parent nodes.

#include <GBayesianNetwork.h>

Inheritance diagram for GClasses::GBNSum:
GClasses::GBNNode

Public Member Functions

 GBNSum ()
 General-purpose constructor. More...
 
virtual ~GBNSum ()
 
void addParent (GBNNode *pNode)
 Adds a new parent node to this one, to be included in the summation. All parents must be added before any child nodes are added. More...
 
virtual double currentValue ()
 Returns the sum of the current values of all the parents of this node. More...
 
virtual void onNewChild (GBNVariable *pChild)
 This method links all the parent nodes of this node back to the child. More...
 
- Public Member Functions inherited from GClasses::GBNNode
 GBNNode ()
 
virtual ~GBNNode ()
 

Protected Attributes

bool m_gotChildren
 
std::vector< GBNNode * > m_parents
 
- Protected Attributes inherited from GClasses::GBNNode
bool m_observed
 
double m_observedValue
 

Constructor & Destructor Documentation

GClasses::GBNSum::GBNSum ( )
inline

General-purpose constructor.

virtual GClasses::GBNSum::~GBNSum ( )
inlinevirtual

Member Function Documentation

void GClasses::GBNSum::addParent ( GBNNode pNode)

Adds a new parent node to this one, to be included in the summation. All parents must be added before any child nodes are added.

virtual double GClasses::GBNSum::currentValue ( )
virtual

Returns the sum of the current values of all the parents of this node.

Implements GClasses::GBNNode.

virtual void GClasses::GBNSum::onNewChild ( GBNVariable pChild)
virtual

This method links all the parent nodes of this node back to the child.

Implements GClasses::GBNNode.

Member Data Documentation

bool GClasses::GBNSum::m_gotChildren
protected
std::vector<GBNNode*> GClasses::GBNSum::m_parents
protected