Class to represent a theory assignment.
More...
#include <theory.hh>
|
| TheoryAssignment (clingo_theory_t const *theory, uint32_t thread_id) |
| Construct a theory assignment from its C representation and a thread id.
|
|
auto | lookup (Symbol const &sym) const -> std::optional< size_t > |
| Lookup a symbol in the theory assignment.
|
|
auto | at (size_t index) const -> std::pair< Symbol, std::variant< int, double, Symbol > > |
| Get the symbol value pair at the given index in the theory assignment.
|
|
auto | begin () const -> iterator |
| Get an iterator pointing to the first element of the theory assignment.
|
|
|
static auto | end () -> sentinel |
| Get sentinel marking the end of the theory assignment.
|
|
Class to represent a theory assignment.
◆ TheoryAssignment()
Clingo::TheoryAssignment::TheoryAssignment |
( |
clingo_theory_t const * |
theory, |
|
|
uint32_t |
thread_id |
|
) |
| |
|
inlineexplicit |
Construct a theory assignment from its C representation and a thread id.
- Parameters
-
theory | the C theory representation |
thread_id | the thread id for which to get the assignment |
◆ at()
auto Clingo::TheoryAssignment::at |
( |
size_t |
index | ) |
const -> std::pair<Symbol, std::variant<int, double, Symbol>> |
|
inline |
Get the symbol value pair at the given index in the theory assignment.
- Parameters
-
index | the index of the value to get |
- Returns
- the symbol and its value at the given index
◆ begin()
auto Clingo::TheoryAssignment::begin |
( |
| ) |
const -> iterator |
|
inline |
Get an iterator pointing to the first element of the theory assignment.
- Returns
- an iterator to the first element
◆ end()
static auto Clingo::TheoryAssignment::end |
( |
| ) |
-> sentinel |
|
inlinestatic |
Get sentinel marking the end of the theory assignment.
- Returns
- a sentinel marking the end of the theory assignment
◆ lookup()
auto Clingo::TheoryAssignment::lookup |
( |
Symbol const & |
sym | ) |
const -> std::optional<size_t> |
|
inline |
Lookup a symbol in the theory assignment.
- Parameters
-
- Returns
- the index of the symbol if found, or std::nullopt if not found
The documentation for this class was generated from the following file: