Direct Graphical Models  v.1.7.0
DirectGraphicalModels::CPDFGaussian Class Reference

Gaissian-based PDF class. More...

#include <PDFGaussian.h>

Inheritance diagram for DirectGraphicalModels::CPDFGaussian:
Collaboration diagram for DirectGraphicalModels::CPDFGaussian:

Public Member Functions

 CPDFGaussian (void)
 
virtual ~CPDFGaussian (void)
 
virtual void reset (void)
 Resets class variables. More...
 
virtual void addPoint (Scalar point)
 Adds a sample point for PDF estimation. More...
 
virtual double getDensity (Scalar point)
 Returns the probability density value for the argument point. More...
 
virtual Scalar min (void) const
 Returns the lower argument boundary of the PDF. More...
 
virtual Scalar max (void) const
 Returns the upper argument boundary of the PDF. More...
 
- Public Member Functions inherited from DirectGraphicalModels::IPDF
 IPDF (void)
 
virtual ~IPDF (void)
 
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 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 Member Functions

virtual void saveFile (FILE *pFile) const
 Saves the random model into the file. More...
 
virtual void loadFile (FILE *pFile)
 Loads the random model from the file. More...
 
- Protected Member Functions inherited from DirectGraphicalModels::CBaseRandomModel
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...
 

Private Attributes

double m_mu
 
double m_sigma2
 

Additional Inherited Members

- Protected Attributes inherited from DirectGraphicalModels::IPDF
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...
 

Detailed Description

Gaissian-based PDF class.

This class approximates PDF via Gaussian functions.

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 15 of file PDFGaussian.h.

Constructor & Destructor Documentation

◆ CPDFGaussian()

DirectGraphicalModels::CPDFGaussian::CPDFGaussian ( void  )
inline

Definition at line 18 of file PDFGaussian.h.

◆ ~CPDFGaussian()

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

Definition at line 19 of file PDFGaussian.h.

Member Function Documentation

◆ addPoint()

void DirectGraphicalModels::CPDFGaussian::addPoint ( Scalar  point)
virtual

Adds a sample point for PDF estimation.

Parameters
pointThe sample point.

Implements DirectGraphicalModels::IPDF.

Definition at line 11 of file PDFGaussian.cpp.

◆ getDensity()

double DirectGraphicalModels::CPDFGaussian::getDensity ( Scalar  point)
virtual

Returns the probability density value for the argument point.

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

Implements DirectGraphicalModels::IPDF.

Definition at line 24 of file PDFGaussian.cpp.

◆ loadFile()

void DirectGraphicalModels::CPDFGaussian::loadFile ( FILE *  pFile)
protectedvirtual

Loads the random model from the file.

Allows to re-use the class.

Parameters
pFilePointer to the file, opened for reading.

Implements DirectGraphicalModels::CBaseRandomModel.

Definition at line 38 of file PDFGaussian.cpp.

◆ max()

virtual Scalar DirectGraphicalModels::CPDFGaussian::max ( void  ) const
inlinevirtual

Returns the upper argument boundary of the PDF.

Returns
The upper bound

Implements DirectGraphicalModels::IPDF.

Definition at line 26 of file PDFGaussian.h.

◆ min()

virtual Scalar DirectGraphicalModels::CPDFGaussian::min ( void  ) const
inlinevirtual

Returns the lower argument boundary of the PDF.

Returns
The lower bound

Implements DirectGraphicalModels::IPDF.

Definition at line 25 of file PDFGaussian.h.

◆ reset()

void DirectGraphicalModels::CPDFGaussian::reset ( void  )
virtual

Resets class variables.

Allows to re-use the class.

Implements DirectGraphicalModels::CBaseRandomModel.

Definition at line 5 of file PDFGaussian.cpp.

◆ saveFile()

void DirectGraphicalModels::CPDFGaussian::saveFile ( FILE *  pFile) const
protectedvirtual

Saves the random model into the file.

Allows to re-use the class.

Parameters
pFilePointer to the file, opened for writing.

Implements DirectGraphicalModels::CBaseRandomModel.

Definition at line 32 of file PDFGaussian.cpp.

Member Data Documentation

◆ m_mu

double DirectGraphicalModels::CPDFGaussian::m_mu
private

Definition at line 35 of file PDFGaussian.h.

◆ m_sigma2

double DirectGraphicalModels::CPDFGaussian::m_sigma2
private

Definition at line 36 of file PDFGaussian.h.


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