49#ifndef SKOORINTERPRETER_H
50#define SKOORINTERPRETER_H
52#ifndef DOXYGEN_SHOULD_SKIP_THIS
112 const std::vector< QueryResult >&
results()
const;
123 std::vector< std::string >
getPaths()
const;
124 void addPath(std::string path);
181 std::string
_readFile_(
const std::string& file);
Headers for the O3prmReader class.
Headers of O3prmInterpreter.
This class is used contain and manipulate gum::ParseError.
The class for generic Hash Tables.
This class is used to represent parsing errors for the different parser implemented in aGrUM.
~O3prmrInterpreter()
Destructor. Delete current context.
const PRMSystem< double > & system(std::string &ident)
std::string _readFile_(const std::string &file)
bool checkQuery(QueryCommand< double > *command)
std::string findAttributeName(const std::string &s, const gum::prm::PRMInstance< double > &instance)
void addPath(std::string path)
Root paths to search from there packages. Default are './' and one is calculate from request package ...
void showElegantErrors(std::ostream &o=std::cerr) const
send on std::cerr the list of errors
bool observe(const ObserveCommand< double > *command)
bool checkSetGndEngine(SetGndEngineCommand *command)
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr) const
send on std::cerr the list of errors or warnings
bool interpretFile(const std::string &filename)
Interpret the file or the command line.
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...
void setContext(O3prmrContext< double > *context)
Setter for the context.
ErrorsContainer errorsContainer() const
Return container with all errors.
void showErrorCounts(std::ostream &o=std::cerr) const
send on std::cerr the number of errors and the number of warnings
void setSyntaxMode(bool f)
syntax mode don't process anything, just check syntax.
const gum::prm::PRMInference< double > * inference() const
Retrieve inference motor object.
O3prmrInterpreter()
This constructor create an empty context.
bool checkObserve(ObserveCommand< double > *command)
std::vector< QueryResult > m_results
gum::prm::PRMInference< double > * m_inf
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.
HashTable< const PRMSystem< double > *, PRMInference< double > * > m_inf_map
gum::BayesNet< double > * m_bn
void generateInfEngine(const gum::prm::PRMSystem< double > &sys)
void clearPaths()
Root paths to search from there packages. Default are './' and one is calculate from request package ...
bool checkUnobserve(UnobserveCommand< double > *command)
O3prmrContext< double > * m_context
const std::vector< QueryResult > & results() const
Return a vector of QueryResults. Each QueryResults is a struct with query command,...
std::vector< std::string > m_paths
void addError(std::string msg)
gum::prm::o3prm::O3prmReader< double > * m_reader
bool isVerboseMode() const
verbose mode show more details on the program execution. Default is false.
bool checkSemantic(O3prmrContext< double > *context)
Check semantic validity of context.
bool interpret(O3prmrContext< double > *c)
Crée le prm correspondant au contexte courant.
void setGndEngine(const SetGndEngineCommand *command)
void setEngine(const SetEngineCommand *command)
std::string findInstanceName(std::string &s, const gum::prm::PRMSystem< double > &sys)
const gum::prm::PRM< double > * prm() const
Retrieve prm object.
bool checkSetEngine(SetEngineCommand *command)
std::string findSystemName(std::string &s)
void query(const QueryCommand< double > *command)
bool interpretLine(const std::string &line)
bool unobserve(const UnobserveCommand< double > *command)
ParseError error(Idx i) const
throw a string error if i >= count
gum::ErrorsContainer m_errors
Size count() const
En cas d'échec, l'API de gestion d'erreurs est présente.
void addWarning(std::string msg)
void setVerboseMode(bool f)
verbose mode show more details on the program execution.
std::vector< SingleResult > values
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities