31 #ifndef GUM_PRM_O3PRM_BNREADER_H 32 #define GUM_PRM_O3PRM_BNREADER_H 37 #include <agrum/BN/io/BNReader.h> 38 #include <agrum/tools/core/errorsContainer.h> 40 #include <agrum/PRM/PRM.h> 41 #include <agrum/PRM/o3prm/O3prmReader.h> 55 template <
typename GUM_SCALAR >
59 const std::string& filename,
60 const std::string& entityName =
"",
61 const std::string& classPath =
"");
82 bool errIsError(Idx i) {
return _errors_.error(i).is_error; }
84 std::string
errMsg(Idx i) {
return _errors_.error(i).msg; }
91 _errors_.elegantErrorsAndWarnings(o);
107 void _generateBN_(prm::PRMSystem< GUM_SCALAR >& system);
109 const std::string& type,
110 const std::string& name,
111 const std::string& toRemove =
"");
119 #include <agrum/PRM/o3prm/O3prmBNReader_tpl.h> 122 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS void _generateBN_(prm::PRMSystem< GUM_SCALAR > &system)
Idx errCol(Idx i)
col of ith error or warning
Idx errLine(Idx i)
publishing Errors API
static std::string _getVariableName_(const std::string &path, const std::string &type, const std::string &name, const std::string &toRemove="")
INLINE void emplace(Args &&... args)
O3prmBNReader(BayesNet< GUM_SCALAR > *bn, const std::string &filename, const std::string &entityName="", const std::string &classPath="")
static std::string _getInstanceName_(const std::string &classname)
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings
static std::string _getEntityName_(const std::string &filename)
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 errors
BayesNet< GUM_SCALAR > * _bn_
Size errors()
publishing Errors API
void showErrorCounts(std::ostream &o=std::cerr)
send on std::cerr the number of errors and the number of warnings
bool errIsError(Idx i)
type of ith error or warning
Read an O3PRM and transform the gum::prm::PRMSystem into gum::BayesNet.
Size proceed()
parse the file