Direct Graphical Models  v.1.7.0
DirectGraphicalModels::IPDF Class Referenceabstract

Interface class for Probability Density Function (PDF) More...

#include <IPDF.h>

Inheritance diagram for DirectGraphicalModels::IPDF:
Collaboration diagram for DirectGraphicalModels::IPDF:

Public Member Functions

 IPDF (void)
 
virtual ~IPDF (void)
 
virtual void addPoint (Scalar point)=0
 Adds a sample point for PDF estimation. More...
 
virtual double getDensity (Scalar point)=0
 Returns the probability density value for the argument point. More...
 
virtual Scalar min (void) const =0
 Returns the lower argument boundary of the PDF. More...
 
virtual Scalar max (void) const =0
 Returns the upper argument boundary of the PDF. More...
 
bool isEstimated (void)
 Checks weather the PDF was estimated. More...
 
- Public Member Functions inherited from DirectGraphicalModels::CBaseRandomModel
 CBaseRandomModel (byte nStates)
 Constructor. More...
 
virtual ~CBaseRandomModel (void)
 
virtual void reset (void)=0
 Resets class variables. More...
 
virtual void save (const std::string &path, const std::string &name=std::string(), short idx=-1) const
 Saves the training data. More...
 
virtual void load (const std::string &path, const std::string &name=std::string(), short idx=-1)
 Loads the training data. More...
 
byte getNumStates (void) const
 Returns number of states (classes) More...
 

Protected Attributes

long m_nPoints
 The number of samples, added with the addPoint() function. More...
 
- Protected Attributes inherited from DirectGraphicalModels::CBaseRandomModel
byte m_nStates
 The number of states (classes) More...
 

Friends

class CTrainNodeBayes
 

Additional Inherited Members

- Protected Member Functions inherited from DirectGraphicalModels::CBaseRandomModel
virtual void saveFile (FILE *pFile) const =0
 Saves the random model into the file. More...
 
virtual void loadFile (FILE *pFile)=0
 Loads the random model from the file. More...
 
std::string generateFileName (const std::string &path, const std::string &name, short idx) const
 Generates name of the data file for storing random model parameters. More...
 

Detailed Description

Interface class for Probability Density Function (PDF)

This class defines the interface for estimation of probability density functions for random read-valued variables

Author
Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de

Definition at line 16 of file IPDF.h.

Constructor & Destructor Documentation

◆ IPDF()

DirectGraphicalModels::IPDF::IPDF ( void  )
inline

Definition at line 21 of file IPDF.h.

◆ ~IPDF()

virtual DirectGraphicalModels::IPDF::~IPDF ( void  )
inlinevirtual

Definition at line 22 of file IPDF.h.

Member Function Documentation

◆ addPoint()

virtual void DirectGraphicalModels::IPDF::addPoint ( Scalar  point)
pure virtual

Adds a sample point for PDF estimation.

Parameters
pointThe sample point.

Implemented in DirectGraphicalModels::CPDFHistogram2D, DirectGraphicalModels::CPDFHistogram, and DirectGraphicalModels::CPDFGaussian.

Here is the caller graph for this function:

◆ getDensity()

virtual double DirectGraphicalModels::IPDF::getDensity ( Scalar  point)
pure virtual

Returns the probability density value for the argument point.

Parameters
pointThe sample point.
Returns
The corresponding probaility density value.

Implemented in DirectGraphicalModels::CPDFHistogram2D, DirectGraphicalModels::CPDFHistogram, and DirectGraphicalModels::CPDFGaussian.

Here is the caller graph for this function:

◆ isEstimated()

bool DirectGraphicalModels::IPDF::isEstimated ( void  )
inline

Checks weather the PDF was estimated.

Return values
trueif at least one sample was added with the addPoint() function.
falseotherwise

Definition at line 50 of file IPDF.h.

◆ max()

virtual Scalar DirectGraphicalModels::IPDF::max ( void  ) const
pure virtual

Returns the upper argument boundary of the PDF.

Returns
The upper bound

Implemented in DirectGraphicalModels::CPDFHistogram2D, DirectGraphicalModels::CPDFHistogram, and DirectGraphicalModels::CPDFGaussian.

◆ min()

virtual Scalar DirectGraphicalModels::IPDF::min ( void  ) const
pure virtual

Returns the lower argument boundary of the PDF.

Returns
The lower bound

Implemented in DirectGraphicalModels::CPDFHistogram2D, DirectGraphicalModels::CPDFHistogram, and DirectGraphicalModels::CPDFGaussian.

Friends And Related Function Documentation

◆ CTrainNodeBayes

friend class CTrainNodeBayes
friend

Definition at line 18 of file IPDF.h.

Member Data Documentation

◆ m_nPoints

long DirectGraphicalModels::IPDF::m_nPoints
protected

The number of samples, added with the addPoint() function.

Definition at line 54 of file IPDF.h.


The documentation for this class was generated from the following file: