51#ifndef UAI_MRF_READER_H
52#define UAI_MRF_READER_H
61#ifndef DOXYGEN_SHOULD_SKIP_THIS
63# undef _COCO_PARSER_H_
64# undef _COCO_SCANNER_H_
65# include <agrum/MRF/io/UAI/cocoR/Parser.h>
81 template <
typename GUM_SCALAR >
93 UAIMRFReader(MarkovRandomField< GUM_SCALAR >* MN,
const std::string& filename);
149 MarkovRandomField< GUM_SCALAR >*
_mn_;
162 const
std::
string& s);
168#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Definition of abstract classes for file input manipulation of Markov random fields.
MRFReader(MarkovRandomField< GUM_SCALAR > *MN, const std::string &filename)
Constructor A reader is defined for reading a defined file.
UAIMRF::Scanner & scanner()
Direct access to DSL scanner (mandatory for listener connection).
Size proceed() final
parse.
void buildFromQuartets(std::vector< std::tuple< float, int, int, int > > quartets)
bool errIsError(Idx i)
type of ith error or warning
Idx errCol(Idx i)
col of ith error or warning
UAIMRF::Scanner * _scanner_
Size errors()
publishing Errors API
UAIMRF::Parser * _parser_
void showErrorCounts(std::ostream &o=std::cerr)
send on std::cerr the number of errors and the number of warnings
std::string errMsg(Idx i)
message of ith error or warning
void showElegantErrors(std::ostream &o=std::cerr)
send on std::cerr the list of errorswith contents
~UAIMRFReader()
Default destructor.
MarkovRandomField< GUM_SCALAR > * _mn_
void _addFatalError_(Idx lig, Idx col, const std::string &s)
bool trace() const
accessor to trace function (just write the number of parser line)
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings with contents
UAIMRFReader(MarkovRandomField< GUM_SCALAR > *MN, const std::string &filename)
Constructor A reader is defined for reading a defined file.
void showErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings
void _addError_(Idx lig, Idx col, const std::string &s)
Idx errLine(Idx i)
line of ith error or warning
void _addWarning_(Idx lig, Idx col, const std::string &s)
const std::string & streamName() const
name of read file
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities