Clingo
|
Class to provide access to terms in a program. More...
#include <base.hh>
Public Member Functions | |
Term (clingo_term_base_t const &base, size_t index) | |
Construct a term from its C representation. | |
auto | symbol () const -> Symbol |
Get the symbol of the term. | |
auto | condition () const -> std::vector< ProgramLiteralVector > |
Get the condition of the term. | |
auto | hash () const noexcept -> size_t |
Get the hash of the term. | |
Friends | |
auto | operator== (Term const &a, Term const &b) noexcept -> bool |
Compare two terms for equality. | |
auto | operator<=> (Term const &a, Term const &b) noexcept -> std::strong_ordering |
Compare two terms. | |
Class to provide access to terms in a program.
|
inlineexplicit |
Construct a term from its C representation.
base | the C term base |
index | the index of the term |
|
inline |
Get the condition of the term.
Get the hash of the term.
The hash enables usage in hash tables. There is also an associtaed specialization of std::hash
for this class.
Get the symbol of the term.
Compare two terms.
a | the first term |
b | the second term |
Compare two terms for equality.
a | the first term |
b | the second term |