61 template < GUM_Numeric GUM_SCALAR >
67 template < GUM_Numeric GUM_SCALAR >
72 template < GUM_Numeric GUM_SCALAR >
77 template < GUM_Numeric GUM_SCALAR >
84 template < GUM_Numeric GUM_SCALAR >
88 template < GUM_Numeric GUM_SCALAR >
92 template < GUM_Numeric GUM_SCALAR >
97 template < GUM_Numeric GUM_SCALAR >
99 return "unobserve " +
value +
";";
104 template < GUM_Numeric GUM_SCALAR >
108 template < GUM_Numeric GUM_SCALAR >
113 template < GUM_Numeric GUM_SCALAR >
115 return "? " +
value +
";";
120 template < GUM_Numeric GUM_SCALAR >
125 template < GUM_Numeric GUM_SCALAR >
134 template < GUM_Numeric GUM_SCALAR >
140 template < GUM_Numeric GUM_SCALAR >
147 template < GUM_Numeric GUM_SCALAR >
156 template < GUM_Numeric GUM_SCALAR >
161 template < GUM_Numeric GUM_SCALAR >
166 template < GUM_Numeric GUM_SCALAR >
171 template < GUM_Numeric GUM_SCALAR >
179 template < GUM_Numeric GUM_SCALAR >
184 template < GUM_Numeric GUM_SCALAR >
186 std::string_view
import,
187 std::string_view alias) {
193 template < GUM_Numeric GUM_SCALAR >
200 template < GUM_Numeric GUM_SCALAR >
205 template < GUM_Numeric GUM_SCALAR >
210 template < GUM_Numeric GUM_SCALAR >
215 output +=
"package " +
m_package +
";\n";
220 output += (*i)->toString() +
"\n";
225 output += (*i)->toString() +
"\n";
230 template < GUM_Numeric GUM_SCALAR >
234 for (std::vector< ImportCommand* >::const_iterator i =
imports.begin(); i !=
imports.end();
251 template < GUM_Numeric GUM_SCALAR >
256 template < GUM_Numeric GUM_SCALAR >
262 template < GUM_Numeric GUM_SCALAR >
270 template < GUM_Numeric GUM_SCALAR >
275 template < GUM_Numeric GUM_SCALAR >
280 template < GUM_Numeric GUM_SCALAR >
285 template < GUM_Numeric GUM_SCALAR >
287 std::string_view leftValue,
288 std::string_view rightValue) {
292 template < GUM_Numeric GUM_SCALAR >
297 template < GUM_Numeric GUM_SCALAR >
302 template < GUM_Numeric GUM_SCALAR >
307 template < GUM_Numeric GUM_SCALAR >
312 template < GUM_Numeric GUM_SCALAR >
314 switch (command->
type()) {
340 template < GUM_Numeric GUM_SCALAR >
344 output +=
"request " +
m_name +
" {\n";
346 for (std::vector< O3prmrCommand* >::const_iterator i =
m_commands.begin();
350 output += (*i)->toString() +
"\n";
358 template < GUM_Numeric GUM_SCALAR >
361 for (std::vector< O3prmrCommand* >::const_iterator i = c.
m_commands.begin();
Headers of O3prmInterpreter.
This is an abstract class.
virtual RequestType type() const =0
std::vector< ImportCommand * > m_imports
ImportCommand * m_mainImport
void addImport(int line, std::string_view import, std::string_view alias)
std::vector< O3prmrSession< GUM_SCALAR > * > sessions() const
void addSession(const O3prmrSession< GUM_SCALAR > &session)
virtual std::string toString() const
std::vector< ImportCommand * > imports() const
std::vector< O3prmrSession< GUM_SCALAR > * > m_sessions
O3prmrContext(std::string_view filename="")
const ImportCommand * mainImport() const
std::string aliasToImport(std::string_view alias)
void setPackage(std::string_view package)
std::string filename() const
O3prmrContext & operator+=(const O3prmrContext &c)
std::string package() const
This class contains a o3prmr session.
O3prmrSession & operator+=(const O3prmrSession &c)
O3prmrSession(std::string_view name="")
std::vector< O3prmrCommand * > commands() const
void addSetEngine(int line, std::string_view value)
void addUnobserve(int line, std::string_view value)
std::string m_name
The session name;.
virtual std::string toString() const
void addObserve(int line, std::string_view leftValue, std::string_view rightValue)
void addQuery(int line, std::string_view value)
void addSetGndEngine(int line, std::string_view value)
std::vector< O3prmrCommand * > m_commands
A sequence of commands.
void addCommand(const O3prmrCommand *command)
std::string toString() const override
RequestType type() const override
PRMInference< GUM_SCALAR >::Chain chain
const PRMSystem< GUM_SCALAR > * system
ObserveCommand(int line, std::string_view leftValue, std::string_view rightValue)
const PRMSystem< GUM_SCALAR > * system
RequestType type() const override
std::string toString() const override
QueryCommand(int line, std::string_view val)
UnobserveCommand(int line, std::string_view value)
PRMInference< GUM_SCALAR >::Chain chain
const PRMSystem< GUM_SCALAR > * system
std::string toString() const override
RequestType type() const override
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