MipBaselib::Discrete Class Reference
[Probability Density Functions (PDF) and Hypotesis Densities (PHD)]

Provides a class to represent the generic Discrete pdf. More...

#include <Discrete.h>

Inheritance diagram for MipBaselib::Discrete:

MipBaselib::PDF MipBaselib::GaussianComponentJointDiscrete

List of all members.

Public Member Functions

 Discrete ()
 Default Constructor.
 Discrete (DCol &x, DCol &p)
 Complete Constructor.
 Discrete (const Discrete &g)
 Copy Constructor.
void operator= (const Discrete &g)
 Operator =.
DCol expectedValue ()
 Returns the expected value.
Decimal covariance (int row, int col)
 Returns the (row-th, col-th) element of the covariance matrix.
Decimal covariance ()
 Returns the covariance matrix as a vector of vector with the appropriate size.
Decimal evaluate (DCol p)
 Returns the the value of the pdf in the given position.
void printCovInv ()
 Print the invese of the covariance.
virtual string print ()
 Returns the the value of the pdf in the given position.
bool findValue (int v, Decimal &pr)
 Returns if a given value is present in the distribution.
void addValue (int v, Decimal pr)
 Add a new value or add the probability to an existing value.
void addValue (ProbabilityMass a)
 Add a new value or add the probability to an existing value.
void normalize ()
 Normalize the probability to 1.


Detailed Description

Provides a class to represent the generic Discrete pdf.

Author:
Paolo Stegagno

Constructor & Destructor Documentation

MipBaselib::Discrete::Discrete (  ) 

Default Constructor.

MipBaselib::Discrete::Discrete ( DCol x,
DCol p 
)

Complete Constructor.

Parameters:
[in] m Values.
[in] c probability of the values.

MipBaselib::Discrete::Discrete ( const Discrete g  ) 

Copy Constructor.

Parameters:
[in] &g Copied Discrete.


Member Function Documentation

void MipBaselib::Discrete::operator= ( const Discrete g  ) 

Operator =.

Parameters:
[in] &g Copied Discrete.

DCol MipBaselib::Discrete::expectedValue (  )  [virtual]

Returns the expected value.

Implements MipBaselib::PDF.

Decimal MipBaselib::Discrete::covariance ( int  row,
int  col 
) [virtual]

Returns the (row-th, col-th) element of the covariance matrix.

Parameters:
[in] row Requested row.
[in] col Requested column.

Implements MipBaselib::PDF.

Decimal MipBaselib::Discrete::covariance (  ) 

Returns the covariance matrix as a vector of vector with the appropriate size.

Decimal MipBaselib::Discrete::evaluate ( DCol  p  )  [virtual]

Returns the the value of the pdf in the given position.

Parameters:
[in] col Requested position.

Implements MipBaselib::PDF.

void MipBaselib::Discrete::printCovInv (  ) 

Print the invese of the covariance.

Parameters:
[in] col Requested position.

string MipBaselib::Discrete::print (  )  [virtual]

Returns the the value of the pdf in the given position.

Parameters:
[in] col Requested position.

bool MipBaselib::Discrete::findValue ( int  v,
Decimal pr 
)

Returns if a given value is present in the distribution.

Parameters:
[in] v Requested value.
[out] &pr Writes here the probability of the given value, if value is found.
Returns:
true if value is in the distribution, false otherwise.

void MipBaselib::Discrete::addValue ( int  v,
Decimal  pr 
)

Add a new value or add the probability to an existing value.

Parameters:
[in] v New Value.
[in] pr Probability of the new value.

void MipBaselib::Discrete::addValue ( ProbabilityMass  a  ) 

Add a new value or add the probability to an existing value.

Parameters:
[in] v New Probability mass.

void MipBaselib::Discrete::normalize (  ) 

Normalize the probability to 1.


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

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6