|
libDAI
|
Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables. More...
#include <dai/evidence.h>
Public Types | |
| typedef std::map< Var, size_t > | Observation |
| Stores joint state of a set of variables. | |
Public Member Functions | |
| Evidence () | |
| Default constructor. | |
| Evidence (std::vector< Observation > &samples) | |
| Construct from samples. | |
| void | addEvidenceTabFile (std::istream &is, FactorGraph &fg) |
Read in tabular data from a stream and add the read samples to *this. | |
| size_t | nrSamples () const |
| Returns number of stored samples. | |
Private Member Functions | |
| void | addEvidenceTabFile (std::istream &is, std::map< std::string, Var > &varMap) |
Read in tabular data from a stream and add the read samples to *this. | |
Private Attributes | |
| std::vector< Observation > | _samples |
| Each sample is an observed joint state of some variables. | |
Iterator interface | |
| typedef std::vector < Observation >::iterator | iterator |
| Iterator over the samples. | |
| typedef std::vector < Observation > ::const_iterator | const_iterator |
| Constant iterator over the samples. | |
| iterator | begin () |
| Returns iterator that points to the first sample. | |
| const_iterator | begin () const |
| Returns constant iterator that points to the first sample. | |
| iterator | end () |
| Returns iterator that points beyond the last sample. | |
| const_iterator | end () const |
| Returns constant iterator that points beyond the last sample. | |
Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables.
| typedef std::map<Var, size_t> dai::Evidence::Observation |
Stores joint state of a set of variables.
| typedef std::vector<Observation>::iterator dai::Evidence::iterator |
Iterator over the samples.
| typedef std::vector<Observation>::const_iterator dai::Evidence::const_iterator |
Constant iterator over the samples.
| dai::Evidence::Evidence | ( | ) | [inline] |
Default constructor.
| dai::Evidence::Evidence | ( | std::vector< Observation > & | samples | ) | [inline] |
Construct from samples.
| void dai::Evidence::addEvidenceTabFile | ( | std::istream & | is, |
| FactorGraph & | fg | ||
| ) |
Read in tabular data from a stream and add the read samples to *this.
| is | Input stream in .tab file format, describing joint observations of variables in fg |
| fg | Factor graph describing the corresponding variables |
| INVALID_EVIDENCE_FILE | if the input stream is not valid |
| size_t dai::Evidence::nrSamples | ( | ) | const [inline] |
Returns number of stored samples.
| iterator dai::Evidence::begin | ( | ) | [inline] |
Returns iterator that points to the first sample.
| const_iterator dai::Evidence::begin | ( | ) | const [inline] |
Returns constant iterator that points to the first sample.
| iterator dai::Evidence::end | ( | ) | [inline] |
Returns iterator that points beyond the last sample.
| const_iterator dai::Evidence::end | ( | ) | const [inline] |
Returns constant iterator that points beyond the last sample.
| void dai::Evidence::addEvidenceTabFile | ( | std::istream & | is, |
| std::map< std::string, Var > & | varMap | ||
| ) | [private] |
Read in tabular data from a stream and add the read samples to *this.
std::vector<Observation> dai::Evidence::_samples [private] |
Each sample is an observed joint state of some variables.
1.7.4