29 #ifndef SKOORINTERPRETER_H 30 #define SKOORINTERPRETER_H 32 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 # include <agrum/PRM/inference/PRMInference.h> 34 # include <agrum/PRM/o3prm/O3prmReader.h> 35 # include <agrum/PRM/o3prmr/O3prmrContext.h> 37 # include <agrum/tools/core/errorsContainer.h> 100 void setContext(O3prmrContext<
double >* context);
106 void addPath(std::string path);
143 bool checkQuery(QueryCommand<
double >* command);
145 bool interpret(O3prmrContext<
double >* c);
146 bool import(O3prmrContext<
double >* context, std::string import);
147 bool observe(
const ObserveCommand<
double >* command);
148 bool unobserve(
const UnobserveCommand<
double >* command);
149 void query(
const QueryCommand<
double >* command);
150 void setEngine(
const SetEngineCommand* command);
void showElegantErrors(std::ostream &o=std::cerr) const
send on std::cerr the list of errors
bool observe(const ObserveCommand< double > *command)
void addPath(std::string path)
Root paths to search from there packages. Default are './' and one is calculate from request package ...
void generateInfEngine(const gum::prm::PRMSystem< double > &sys)
const gum::prm::PRM< double > * prm() const
Retrieve prm object.
void query(const QueryCommand< double > *command)
bool checkSetEngine(SetEngineCommand *command)
gum::BayesNet< double > * m_bn
INLINE void emplace(Args &&... args)
bool checkSemantic(O3prmrContext< double > *context)
Check semantic validity of context.
bool isVerboseMode() const
verbose mode show more details on the program execution. Default is false.
bool checkSetGndEngine(SetGndEngineCommand *command)
const gum::prm::PRMInference< double > * inference() const
Retrieve inference motor object.
Size errors() const
of errors
bool checkQuery(QueryCommand< double > *command)
bool checkUnobserve(UnobserveCommand< double > *command)
std::string findSystemName(std::string &s)
gum::prm::o3prm::O3prmReader< double > * m_reader
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr) const
send on std::cerr the list of errors or warnings
ParseError error(Idx i) const
throw a string error if i >= count
bool import(O3prmrContext< double > *context, std::string import)
std::string _readFile_(const std::string &file)
std::vector< SingleResult > values
bool interpret(O3prmrContext< double > *c)
Crée le prm correspondant au contexte courant.
Size warnings() const
of warnings
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
gum::ErrorsContainer m_errors
std::string findAttributeName(const std::string &s, const gum::prm::PRMInstance< double > &instance)
gum::prm::PRMInference< double > * m_inf
std::vector< std::string > m_paths
bool interpretLine(const std::string &line)
void clearPaths()
Root paths to search from there packages. Default are './' and one is calculate from request package ...
void setSyntaxMode(bool f)
syntax mode don't process anything, just check syntax.
ErrorsContainer errorsContainer() const
Return container with all errors.
bool interpretFile(const std::string &filename)
Interpret the file or the command line.
bool checkObserve(ObserveCommand< double > *command)
void addError(std::string msg)
void setGndEngine(const SetGndEngineCommand *command)
void setEngine(const SetEngineCommand *command)
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...
~O3prmrInterpreter()
Destructor. Delete current context.
bool unobserve(const UnobserveCommand< double > *command)
void addWarning(std::string msg)
bool isInSyntaxMode() const
syntax mode don't process anything, just check syntax. Default is false.
O3prmrContext< double > * getContext() const
Getter and setter for the context.
void showErrorCounts(std::ostream &o=std::cerr) const
send on std::cerr the number of errors and the number of warnings
Size count() const
En cas d'échec, l'API de gestion d'erreurs est présente.
HashTable< const PRMSystem< double > *, PRMInference< double > *> m_inf_map
const PRMSystem< double > & system(std::string &ident)
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.
void setContext(O3prmrContext< double > *context)
Setter for the context.
O3prmrInterpreter()
This constructor create an empty context.
std::vector< QueryResult > m_results
std::string findInstanceName(std::string &s, const gum::prm::PRMSystem< double > &sys)
void setVerboseMode(bool f)
verbose mode show more details on the program execution.
O3prmrContext< double > * m_context