![]() |
aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
|
Read an O3PRM and transform the gum::prm::PRMSystem into gum::BayesNet. More...
#include <agrum/PRM/o3prm/O3prmBNReader.h>
Public Member Functions | |
| O3prmBNReader (BayesNet< GUM_SCALAR > *bn, const std::string &filename, const std::string &entityName="", const std::string &classPath="") | |
| ~O3prmBNReader () override | |
| Size | proceed () override |
| parse the file | |
| Size | errors () |
| publishing Errors API | |
| Size | warnings () |
| Idx | errLine (Idx i) |
| publishing Errors API | |
| Idx | errCol (Idx i) |
| col of ith error or warning | |
| bool | errIsError (Idx i) |
| type of ith error or warning | |
| 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 | |
| void | showElegantErrorsAndWarnings (std::ostream &o=std::cerr) |
| send on std::cerr the list of errors or warnings | |
| void | showErrorCounts (std::ostream &o=std::cerr) |
| send on std::cerr the number of errors and the number of warnings | |
Private Member Functions | |
| void | _generateBN_ (prm::PRMSystem< GUM_SCALAR > &system) |
Static Private Member Functions | |
| static std::string | _getVariableName_ (std::string_view path, std::string_view type, std::string_view name, std::string_view toRemove="") |
| static std::string | _getEntityName_ (std::string_view filename) |
| static std::string | _getInstanceName_ (std::string_view classname) |
Private Attributes | |
| std::string | _filename_ |
| std::string | _classpath_ |
| std::string | _entityName_ |
| BayesNet< GUM_SCALAR > * | _bn_ |
| ErrorsContainer | _errors_ |
Read an O3PRM and transform the gum::prm::PRMSystem into gum::BayesNet.
| GUM_SCALAR | The scalar type used both for the gum::prm::PRM and the gum::BayesNet. |
Definition at line 75 of file O3prmBNReader.h.
| gum::O3prmBNReader< GUM_SCALAR >::O3prmBNReader | ( | BayesNet< GUM_SCALAR > * | bn, |
| const std::string & | filename, | ||
| const std::string & | entityName = "", | ||
| const std::string & | classPath = "" ) |
Definition at line 84 of file O3prmBNReader_tpl.h.
References gum::BNReader< GUM_SCALAR >::BNReader(), O3prmBNReader(), _bn_, _classpath_, _entityName_, _filename_, and _getEntityName_().
Referenced by O3prmBNReader(), and ~O3prmBNReader().
|
override |
Definition at line 97 of file O3prmBNReader_tpl.h.
References O3prmBNReader().
|
private |
Definition at line 193 of file O3prmBNReader_tpl.h.
References _bn_, _entityName_, gum::prm::PRMSystem< GUM_SCALAR >::groundedBN(), and gum::prm::PRMSystem< GUM_SCALAR >::instantiate().
Referenced by proceed().
|
staticprivate |
Definition at line 76 of file O3prmBNReader_tpl.h.
Referenced by O3prmBNReader().
|
staticprivate |
Definition at line 69 of file O3prmBNReader_tpl.h.
Referenced by proceed().
|
staticprivate |
Definition at line 56 of file O3prmBNReader_tpl.h.
Referenced by proceed().
| Idx gum::O3prmBNReader< GUM_SCALAR >::errCol | ( | Idx | i | ) |
col of ith error or warning
Definition at line 216 of file O3prmBNReader_tpl.h.
References _errors_.
| bool gum::O3prmBNReader< GUM_SCALAR >::errIsError | ( | Idx | i | ) |
type of ith error or warning
Definition at line 221 of file O3prmBNReader_tpl.h.
References _errors_.
| Idx gum::O3prmBNReader< GUM_SCALAR >::errLine | ( | Idx | i | ) |
publishing Errors API
Definition at line 211 of file O3prmBNReader_tpl.h.
References _errors_.
| std::string gum::O3prmBNReader< GUM_SCALAR >::errMsg | ( | Idx | i | ) |
message of ith error or warning
Definition at line 226 of file O3prmBNReader_tpl.h.
References _errors_.
| Size gum::O3prmBNReader< GUM_SCALAR >::errors | ( | ) |
publishing Errors API
Definition at line 201 of file O3prmBNReader_tpl.h.
References _errors_.
Referenced by proceed().
|
override |
parse the file
parse.
| IOError | if file not exists |
| IOError | if file not exists |
Definition at line 105 of file O3prmBNReader_tpl.h.
References _bn_, _classpath_, _entityName_, _errors_, _filename_, _generateBN_(), _getInstanceName_(), _getVariableName_(), gum::prm::PRMSystem< GUM_SCALAR >::add(), gum::prm::o3prm::O3prmReader< GUM_SCALAR >::addClassPath(), gum::Set< Key >::contains(), errors(), gum::prm::o3prm::O3prmReader< GUM_SCALAR >::errorsContainer(), gum::Set< Key >::insert(), gum::prm::o3prm::O3prmReader< GUM_SCALAR >::prm(), and gum::prm::o3prm::O3prmReader< GUM_SCALAR >::readFile().
| void gum::O3prmBNReader< GUM_SCALAR >::showElegantErrors | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors
Definition at line 231 of file O3prmBNReader_tpl.h.
References _errors_.
| void gum::O3prmBNReader< GUM_SCALAR >::showElegantErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors or warnings
Definition at line 236 of file O3prmBNReader_tpl.h.
References _errors_.
| void gum::O3prmBNReader< GUM_SCALAR >::showErrorCounts | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the number of errors and the number of warnings
Definition at line 241 of file O3prmBNReader_tpl.h.
References _errors_.
| Size gum::O3prmBNReader< GUM_SCALAR >::warnings | ( | ) |
|
private |
Definition at line 126 of file O3prmBNReader.h.
Referenced by O3prmBNReader(), _generateBN_(), and proceed().
|
private |
Definition at line 123 of file O3prmBNReader.h.
Referenced by O3prmBNReader(), and proceed().
|
private |
Definition at line 124 of file O3prmBNReader.h.
Referenced by O3prmBNReader(), _generateBN_(), and proceed().
|
private |
Definition at line 127 of file O3prmBNReader.h.
Referenced by errCol(), errIsError(), errLine(), errMsg(), errors(), proceed(), showElegantErrors(), showElegantErrorsAndWarnings(), showErrorCounts(), and warnings().
|
private |
Definition at line 121 of file O3prmBNReader.h.
Referenced by O3prmBNReader(), and proceed().