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; }
88 errors__.elegantErrors(o);
93 errors__.elegantErrorsAndWarnings(o);
98 errors__.syntheticResults(o);
111 void generateBN__(prm::PRMSystem< GUM_SCALAR >& system);
113 const std::string& type,
114 const std::string& name,
115 const std::string& toRemove =
"");
123 #include <agrum/PRM/o3prm/O3prmBNReader_tpl.h> 126 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS Idx errCol(Idx i)
col of ith error or warning
Idx errLine(Idx i)
publishing Errors API
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 getVariableName__(const std::string &path, const std::string &type, const std::string &name, const std::string &toRemove="")
std::string errMsg(Idx i)
message of ith error or warning
void generateBN__(prm::PRMSystem< GUM_SCALAR > &system)
BayesNet< GUM_SCALAR > * bn__
void showElegantErrors(std::ostream &o=std::cerr)
send on std::cerr the list of errors
Size errors()
publishing Errors API
static std::string getEntityName__(const std::string &filename)
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