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 -> ProgramLiteral |
Get the condition id 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 the condition id of the theory element.
Condition ids are program literals that can be used in the solver. They are equivalenet to the condition of the element.
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 |