![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Pure virtual class for reading a MN from a file. More...
#include <agrum/MN/io/UAI/UAIMNReader.h>
Public Member Functions | |
UAIMNReader (MarkovNet< GUM_SCALAR > *MN, const std::string &filename) | |
Constructor A reader is defined for reading a defined file. More... | |
~UAIMNReader () final | |
Default destructor. More... | |
UAIMN::Scanner & | scanner () |
Direct access to DSL scanner (mandatory for listener connection) More... | |
const std::string & | streamName () const |
name of read file More... | |
bool | trace () const |
accessor to trace function (just write the number of parser line) More... | |
void | trace (bool b) |
Size | proceed () final |
parse. More... | |
void | buildFromQuartets (std::vector< std::tuple< float, int, int, int > > quartets) |
Size | errors () |
publishing Errors API More... | |
Size | warnings () |
of errorsMore... | |
Idx | errLine (Idx i) |
line of ith error or warning More... | |
Idx | errCol (Idx i) |
col of ith error or warning More... | |
bool | errIsError (Idx i) |
type of ith error or warning More... | |
std::string | errMsg (Idx i) |
message of ith error or warning More... | |
void | showElegantErrors (std::ostream &o=std::cerr) |
send on std::cerr the list of errorswith contents More... | |
void | showElegantErrorsAndWarnings (std::ostream &o=std::cerr) |
send on std::cerr the list of errors or warnings with contents More... | |
void | showErrorsAndWarnings (std::ostream &o=std::cerr) |
send on std::cerr the list of errors or warnings More... | |
void | showErrorCounts (std::ostream &o=std::cerr) |
send on std::cerr the number of errors and the number of warnings More... | |
Protected Attributes | |
MarkovNet< GUM_SCALAR > * | _mn_ |
UAIMN::Scanner * | _scanner_ |
UAIMN::Parser * | _parser_ |
std::string | _streamName_ |
bool | _traceScanning_ |
bool | _parseDone_ |
bool | _ioerror_ |
Protected Member Functions | |
void | _addFatalError_ (Idx lig, Idx col, const std::string &s) |
void | _addError_ (Idx lig, Idx col, const std::string &s) |
void | _addWarning_ (Idx lig, Idx col, const std::string &s) |
Pure virtual class for reading a MN from a file.
Every class used to read the content of a Markov Network from a stream, or a file must be a subclass of UAIMNReader.
Definition at line 60 of file UAIMNReader.h.
gum::UAIMNReader< GUM_SCALAR >::UAIMNReader | ( | MarkovNet< GUM_SCALAR > * | MN, |
const std::string & | filename | ||
) |
Constructor A reader is defined for reading a defined file.
Hence the 2 args of the constructor. Note that the MN has to be built outside the reader. There is no delegation to create/destroy the MN from inside the reader.
|
final |
Default destructor.
|
protected |
|
protected |
|
protected |
void gum::UAIMNReader< GUM_SCALAR >::buildFromQuartets | ( | std::vector< std::tuple< float, int, int, int > > | quartets | ) |
Idx gum::UAIMNReader< GUM_SCALAR >::errCol | ( | Idx | i | ) |
col of ith error or warning
bool gum::UAIMNReader< GUM_SCALAR >::errIsError | ( | Idx | i | ) |
type of ith error or warning
Idx gum::UAIMNReader< GUM_SCALAR >::errLine | ( | Idx | i | ) |
line of ith error or warning
std::string gum::UAIMNReader< GUM_SCALAR >::errMsg | ( | Idx | i | ) |
message of ith error or warning
Size gum::UAIMNReader< GUM_SCALAR >::errors | ( | ) |
publishing Errors API
|
finalvirtual |
parse.
IOError | if file not exists |
Implements gum::MNReader< GUM_SCALAR >.
UAIMN::Scanner& gum::UAIMNReader< GUM_SCALAR >::scanner | ( | ) |
Direct access to DSL scanner (mandatory for listener connection)
IOError | if file not exists |
void gum::UAIMNReader< GUM_SCALAR >::showElegantErrors | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errorswith contents
void gum::UAIMNReader< GUM_SCALAR >::showElegantErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors or warnings with contents
void gum::UAIMNReader< GUM_SCALAR >::showErrorCounts | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the number of errors and the number of warnings
void gum::UAIMNReader< GUM_SCALAR >::showErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors or warnings
const std::string& gum::UAIMNReader< GUM_SCALAR >::streamName | ( | ) | const |
name of read file
bool gum::UAIMNReader< GUM_SCALAR >::trace | ( | ) | const |
accessor to trace function (just write the number of parser line)
void gum::UAIMNReader< GUM_SCALAR >::trace | ( | bool | b | ) |
Size gum::UAIMNReader< GUM_SCALAR >::warnings | ( | ) |
|
protected |
Definition at line 137 of file UAIMNReader.h.
|
protected |
Definition at line 127 of file UAIMNReader.h.
|
protected |
Definition at line 133 of file UAIMNReader.h.
|
protected |
Definition at line 129 of file UAIMNReader.h.
|
protected |
Definition at line 128 of file UAIMNReader.h.
|
protected |
Definition at line 131 of file UAIMNReader.h.
|
protected |
Definition at line 132 of file UAIMNReader.h.