/* This file is part of libDAI - http://www.libdai.org/
*
- * libDAI is licensed under the terms of the GNU General Public License version
- * 2, or (at your option) any later version. libDAI is distributed without any
- * warranty. See the file COPYING for more details.
+ * Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
*
- * Copyright (C) 2009 Charles Vaske [cvaske at soe dot ucsc dot edu]
- * Copyright (C) 2009 University of California, Santa Cruz
+ * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
*/
namespace dai {
-/// Stores joint state of a set of variables
-typedef std::map<Var, size_t> Observation;
-
-
/// Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables.
/** \note Each sample can describe the joint state of a different set of variables,
* in order to be able to deal with missing data.
* \author Charles Vaske
*/
class Evidence {
+ public:
+ /// Stores joint state of a set of variables
+ typedef std::map<Var, size_t> Observation;
+
private:
/// Each sample is an observed joint state of some variables
std::vector<Observation> _samples;
/** \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 );