-/// Store observations from a graphical model.
-class Evidence {
- private:
- std::map<std::string, SampleData> _samples;
-public:
- /// Start with empty obects, then fill with calls to addEvidenceTabFile()
- Evidence() : _samples() {}
-
- /** Read in tab-data from a stream. Each line contains one sample, and
- * the first line is a header line with names. The first column contains
- * names for each of the samples.
- */
- void addEvidenceTabFile(std::istream& is, std::map< std::string, Var >& varMap);
-
- /** Read in tab-data from a stream. Each line contains one sample,
- * and the first line is a header line with variable IDs. The first
- * column contains names for each of the samples.
- */
- void addEvidenceTabFile(std::istream& is, FactorGraph& fg);
-
- /// Total number of samples in this evidence file
- size_t nrSamples() const { return _samples.size(); }
-
- /// @name iterator interface
+ /// Read in tabular data from a stream and add the read samples to \c *this.
+ /** \param is Input stream in .tab file format, describing joint observations of variables in \a fg
+ * \param fg Factor graph describing the corresponding variables
+ * \see \ref fileformats-evidence
+ * \throw INVALID_EVIDENCE_FILE if the input stream is not valid
+ */
+ void addEvidenceTabFile( std::istream& is, FactorGraph& fg );
+
+ /// Returns number of stored samples
+ size_t nrSamples() const { return _samples.size(); }
+
+ /// \name Iterator interface