MTMCSim  0.5
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
MTMCSim::pdfXY Class Reference

Handles joint pmf for two sources. More...

#include <pdfXY.h>

Public Member Functions

 pdfXY ()
 
 pdfXY (const vector< double > &xMarPdf_, const vector< vector< double > > &yxCondPdf_)
 Construct from marginal pdf of X and the conditional pdf P(Y|X). More...
 
 pdfXY (const vector< vector< double > > &joPdf_)
 Construct from joint pdf P(X,Y) More...
 
 pdfXY (double agreeProb, int size)
 Q-ary symmetric correlation model. More...
 
 pdfXY (string pdffn, int xSize, int ySize)
 Pdf given in a file. More...
 
double getJoH () const
 
double getHX () const
 
double getHY () const
 
double getCondHYX () const
 
double getCondHXY () const
 
double getIXY () const
 
const vector< vector< double > > & getJoPdf () const
 The returned reference to object has the same life time as the pdfXY object. More...
 
const vector< double > & getXMarPdf () const
 The returned reference to object has the same life time as the pdfXY object. More...
 
const vector< vector< double > > & getYXCondPdf () const
 The returned reference to object has the same life time as the pdfXY object. More...
 
void setPdf (const vector< double > &xMarPdf_, const vector< vector< double > > &yxCondPdf_)
 yxCondPdf should have same number of cols in each row. More...
 
void setPdf (const vector< vector< double > > &joPdf_)
 
void setPdf (double agreeProb, int size)
 
void setPdf (string pdffn, int xSize, int ySize)
 

Detailed Description

Handles joint pmf for two sources.

Reads pmf, compute entropies. (We do not distinguish pmf and pdf here.) copy safe

Constructor & Destructor Documentation

MTMCSim::pdfXY::pdfXY ( )
inline
MTMCSim::pdfXY::pdfXY ( const vector< double > &  xMarPdf_,
const vector< vector< double > > &  yxCondPdf_ 
)
inline

Construct from marginal pdf of X and the conditional pdf P(Y|X).

Parameters
xMarPdf_the ith element = p(x = i)
yxCondPdfthe ith row, jth col:P( Y = j|X = i), yxCondPdf_ should have same number of cols in each row.
MTMCSim::pdfXY::pdfXY ( const vector< vector< double > > &  joPdf_)
inline

Construct from joint pdf P(X,Y)

MTMCSim::pdfXY::pdfXY ( double  agreeProb,
int  size 
)
inline

Q-ary symmetric correlation model.

MTMCSim::pdfXY::pdfXY ( string  pdffn,
int  xSize,
int  ySize 
)
inline

Pdf given in a file.

Member Function Documentation

double MTMCSim::pdfXY::getCondHXY ( ) const
inline
double MTMCSim::pdfXY::getCondHYX ( ) const
inline
double MTMCSim::pdfXY::getHX ( ) const
inline
double MTMCSim::pdfXY::getHY ( ) const
inline
double MTMCSim::pdfXY::getIXY ( ) const
inline
double MTMCSim::pdfXY::getJoH ( ) const
inline
const vector<vector<double> >& MTMCSim::pdfXY::getJoPdf ( ) const
inline

The returned reference to object has the same life time as the pdfXY object.

const vector<double>& MTMCSim::pdfXY::getXMarPdf ( ) const
inline

The returned reference to object has the same life time as the pdfXY object.

const vector<vector<double> >& MTMCSim::pdfXY::getYXCondPdf ( ) const
inline

The returned reference to object has the same life time as the pdfXY object.

void MTMCSim::pdfXY::setPdf ( const vector< double > &  xMarPdf_,
const vector< vector< double > > &  yxCondPdf_ 
)

yxCondPdf should have same number of cols in each row.

void MTMCSim::pdfXY::setPdf ( const vector< vector< double > > &  joPdf_)
void MTMCSim::pdfXY::setPdf ( double  agreeProb,
int  size 
)
void MTMCSim::pdfXY::setPdf ( string  pdffn,
int  xSize,
int  ySize 
)

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