![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Represents a O3PRMR context. More...
#include <O3prmrInterpreter.h>
Public Member Functions | |
O3prmrInterpreter () | |
This constructor create an empty context. More... | |
~O3prmrInterpreter () | |
Destructor. Delete current context. More... | |
bool | interpretFile (const std::string &filename) |
Interpret the file or the command line. More... | |
bool | interpretLine (const std::string &line) |
const gum::prm::PRM< double > * | prm () const |
Retrieve prm object. More... | |
const gum::prm::PRMInference< double > * | inference () const |
Retrieve inference motor object. More... | |
const std::vector< QueryResult > & | results () const |
Return a vector of QueryResults. Each QueryResults is a struct with query command, time and values, a vector of struct SingleResult, with pair label/value. More... | |
ErrorsContainer | errorsContainer () const |
Return container with all errors. More... | |
O3prmrContext< double > * | getContext () const |
Getter and setter for the context. More... | |
void | setContext (O3prmrContext< double > *context) |
Setter for the context. More... | |
std::vector< std::string > | getPaths () const |
Root paths to search from there packages. Default are working dir, request file dir if any and one is calculate from package if any. More... | |
void | addPath (std::string path) |
Root paths to search from there packages. Default are './' and one is calculate from request package if any. More... | |
void | clearPaths () |
Root paths to search from there packages. Default are './' and one is calculate from request package if any. More... | |
bool | isInSyntaxMode () const |
syntax mode don't process anything, just check syntax. Default is false. More... | |
void | setSyntaxMode (bool f) |
syntax mode don't process anything, just check syntax. More... | |
bool | isVerboseMode () const |
verbose mode show more details on the program execution. Default is false. More... | |
void | setVerboseMode (bool f) |
verbose mode show more details on the program execution. More... | |
Size | count () const |
En cas d'échec, l'API de gestion d'erreurs est présente. More... | |
Size | errors () const |
of errorsMore... | |
Size | warnings () const |
of warningsMore... | |
ParseError | error (Idx i) const |
throw a string error if i >= count More... | |
void | showElegantErrors (std::ostream &o=std::cerr) const |
send on std::cerr the list of errors More... | |
void | showElegantErrorsAndWarnings (std::ostream &o=std::cerr) const |
send on std::cerr the list of errors or warnings More... | |
void | showErrorCounts (std::ostream &o=std::cerr) const |
send on std::cerr the number of errors and the number of warnings More... | |
Represents a O3PRMR context.
O3prmr use the <double> version of the O3PRM templatized ecosystem
Definition at line 69 of file O3prmrInterpreter.h.
gum::prm::o3prmr::O3prmrInterpreter::O3prmrInterpreter | ( | ) |
This constructor create an empty context.
Definition at line 53 of file O3prmrInterpreter.cpp.
gum::prm::o3prmr::O3prmrInterpreter::~O3prmrInterpreter | ( | ) |
Destructor. Delete current context.
Definition at line 59 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 176 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 926 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::addPath | ( | std::string | path | ) |
Root paths to search from there packages. Default are './' and one is calculate from request package if any.
Definition at line 91 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 933 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 413 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 479 of file O3prmrInterpreter.cpp.
|
private |
Check semantic validity of context.
Import first all import, and check that systems, instances, attributes and labels exists. While checking, prepare data structures for interpretation. Return true if all is right, false otherwise.
Note : Stop checking at first error unless syntax mode is activated.
Definition at line 296 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 403 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 408 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 456 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::clearPaths | ( | ) |
Root paths to search from there packages. Default are './' and one is calculate from request package if any.
Definition at line 102 of file O3prmrInterpreter.cpp.
Size gum::prm::o3prmr::O3prmrInterpreter::count | ( | ) | const |
En cas d'échec, l'API de gestion d'erreurs est présente.
Definition at line 889 of file O3prmrInterpreter.cpp.
ParseError gum::prm::o3prmr::O3prmrInterpreter::error | ( | Idx | i | ) | const |
throw a string error if i >= count
Definition at line 898 of file O3prmrInterpreter.cpp.
Size gum::prm::o3prmr::O3prmrInterpreter::errors | ( | ) | const |
Definition at line 892 of file O3prmrInterpreter.cpp.
ErrorsContainer gum::prm::o3prmr::O3prmrInterpreter::errorsContainer | ( | ) | const |
Return container with all errors.
Definition at line 905 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 696 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 683 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 655 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 846 of file O3prmrInterpreter.cpp.
O3prmrContext< double > * gum::prm::o3prmr::O3prmrInterpreter::getContext | ( | ) | const |
Getter and setter for the context.
Getter for the context.
Definition at line 73 of file O3prmrInterpreter.cpp.
std::vector< std::string > gum::prm::o3prmr::O3prmrInterpreter::getPaths | ( | ) | const |
Root paths to search from there packages. Default are working dir, request file dir if any and one is calculate from package if any.
Root paths to search from there packages. Default are './' and one is calculate from request package if any.
Definition at line 87 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 505 of file O3prmrInterpreter.cpp.
const PRMInference< double > * gum::prm::o3prmr::O3prmrInterpreter::inference | ( | ) | const |
Retrieve inference motor object.
Definition at line 120 of file O3prmrInterpreter.cpp.
|
private |
Crée le prm correspondant au contexte courant.
Renvoie true en cas de succès, ou false en cas échéant d'échec de l'interprétation du contexte (import introuvable ou non défini, etc).
Definition at line 225 of file O3prmrInterpreter.cpp.
bool gum::prm::o3prmr::O3prmrInterpreter::interpretFile | ( | const std::string & | filename | ) |
Interpret the file or the command line.
Parse the file or the command line.
If syntax mode is activated, check only syntax and semantic. If errors occured, return false. Errors messages can be retrieve be errorsContainer() methods. If any errors occured, return true. Requests results can be retrieve be results() methods.
If errors occured, return false. Errors messages can be retrieve be getErrorsContainer() methods. If any errors occured, return true. Requests results can be retrieve be results() methods.
Definition at line 134 of file O3prmrInterpreter.cpp.
bool gum::prm::o3prmr::O3prmrInterpreter::interpretLine | ( | const std::string & | line | ) |
Definition at line 197 of file O3prmrInterpreter.cpp.
bool gum::prm::o3prmr::O3prmrInterpreter::isInSyntaxMode | ( | ) | const |
syntax mode don't process anything, just check syntax. Default is false.
syntax mode don't process anything, just check syntax.
Definition at line 105 of file O3prmrInterpreter.cpp.
bool gum::prm::o3prmr::O3prmrInterpreter::isVerboseMode | ( | ) | const |
verbose mode show more details on the program execution. Default is false.
verbose mode show more details on the program execution.
Definition at line 111 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 719 of file O3prmrInterpreter.cpp.
Retrieve prm object.
Definition at line 117 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 769 of file O3prmrInterpreter.cpp.
const std::vector< QueryResult > & gum::prm::o3prmr::O3prmrInterpreter::results | ( | ) | const |
Return a vector of QueryResults. Each QueryResults is a struct with query command, time and values, a vector of struct SingleResult, with pair label/value.
Return a std::vector of QueryResults. Each QueryResults is a struct with query command, time and values, a std::vector of struct SingleResult, with pair label/value.
Definition at line 125 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::setContext | ( | O3prmrContext< double > * | context | ) |
Setter for the context.
Definition at line 76 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 836 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 841 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::setSyntaxMode | ( | bool | f | ) |
syntax mode don't process anything, just check syntax.
Definition at line 108 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::setVerboseMode | ( | bool | f | ) |
verbose mode show more details on the program execution.
Definition at line 114 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::showElegantErrors | ( | std::ostream & | o = std::cerr | ) | const |
send on std::cerr the list of errors
Definition at line 908 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::showElegantErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) | const |
send on std::cerr the list of errors or warnings
Definition at line 913 of file O3prmrInterpreter.cpp.
void gum::prm::o3prmr::O3prmrInterpreter::showErrorCounts | ( | std::ostream & | o = std::cerr | ) | const |
send on std::cerr the number of errors and the number of warnings
Definition at line 918 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 705 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 748 of file O3prmrInterpreter.cpp.
Size gum::prm::o3prmr::O3prmrInterpreter::warnings | ( | ) | const |
Definition at line 895 of file O3prmrInterpreter.cpp.
|
private |
Definition at line 168 of file O3prmrInterpreter.h.
|
private |
Definition at line 173 of file O3prmrInterpreter.h.
|
private |
Definition at line 165 of file O3prmrInterpreter.h.
|
private |
Definition at line 179 of file O3prmrInterpreter.h.
|
private |
Definition at line 172 of file O3prmrInterpreter.h.
|
private |
Definition at line 175 of file O3prmrInterpreter.h.
|
private |
Definition at line 170 of file O3prmrInterpreter.h.
|
private |
Definition at line 171 of file O3prmrInterpreter.h.
|
private |
Definition at line 178 of file O3prmrInterpreter.h.
|
private |
Definition at line 167 of file O3prmrInterpreter.h.
|
private |
Definition at line 166 of file O3prmrInterpreter.h.
|
private |
Definition at line 174 of file O3prmrInterpreter.h.
|
private |
Definition at line 176 of file O3prmrInterpreter.h.
|
private |
Definition at line 177 of file O3prmrInterpreter.h.