|
Clingo
|
Class to provide access to theory elements. More...
#include <base.hh>
Public Member Functions | |
| TheoryElement (clingo_theory_base_t const &base, size_t index) | |
| Constructor from C representation. | |
| auto | tuple () const -> TheoryTermVector |
| Get the tuple of the theory element. | |
| auto | condition () const -> ProgramLiteralSpan |
| Get the condition of the theory element. | |
| auto | condition_id () const -> std::optional< ProgramLiteral > |
| Get a program literal for the condition of the theory element. | |
| auto | to_string () const -> std::string |
| Convert the theory element to a string representation. | |
| auto | hash () const noexcept -> size_t |
| Get the hash of the theory element. | |
Friends | |
| auto | operator== (TheoryElement const &a, TheoryElement const &b) noexcept -> bool |
| Compare two theory elements for equality. | |
| auto | operator<=> (TheoryElement const &a, TheoryElement const &b) noexcept -> std::strong_ordering |
| Compare two theory elements. | |
Class to provide access to theory elements.
|
inlineexplicit |
Constructor from C representation.
| base | the C theory base |
| index | the index of the element |
|
inline |
Get the condition of the theory element.
|
inline |
Get a program literal for the condition of the theory element.
True conditions do not have a condition id, in which case std::nullopt is returned. A condition id is only valid for the current solving step.
A condition id can be mapped to a solver literal using Clingo::PropagateInit::solver_literal().
|
inlinenoexcept |
Get the hash of the theory element.
The hash enables usage in hash tables. There is also an associtaed specialization of std::hash for this class.
|
inline |
Convert the theory element to a string representation.
|
inline |
Get the tuple of the theory element.
|
friend |
Compare two theory elements.
| a | the first element |
| b | the second element |
|
friend |
Compare two theory elements for equality.
| a | the first element |
| b | the second element |