|
Clingo
|
Class to provide an mutable view of a model. More...
#include <solve.hh>
Public Member Functions | |
| Model (clingo_model_t *mdl) | |
| Constructor from the underlying C representation. | |
| auto | control () const -> SolveControl |
| Get the associated solve control object. | |
| void | extend (SymbolSpan symbols) const |
| Extend the model with additional symbols. | |
Public Member Functions inherited from Clingo::ConstModel | |
| ConstModel (clingo_model_t const *mdl) | |
| Constructor from the underlying C representation. | |
| auto | symbols (ShowFlags flags=ShowFlags::shown) const -> SymbolVector |
| Get the symbols of the model. | |
| auto | contains (Symbol const &atom) const -> bool |
| Check if the model contains a specific atom. | |
| auto | type () const -> ModelType |
| Get the type of the model. | |
| auto | number () const -> uint64_t |
| Get the running number of the model. | |
| auto | is_true (ProgramLiteral lit) const -> bool |
| Check whether the given literal is true in the model. | |
| auto | is_consequence (ProgramLiteral lit) const -> std::optional< bool > |
| Check whether the given literal is consequence of the model. | |
| auto | cost () const -> SumSpan |
| Get the cost of the model. | |
| auto | priorities () const -> WeightSpan |
| Get the priorities of the costs of a model. | |
| auto | optimality_proven () const -> bool |
| Check whether the model is proven to be optimal. | |
| auto | thread_id () const -> ProgramId |
| Get the thread id of the solver that found the model. | |
| auto | to_string () const -> std::string |
| Convert the model to a string representation. | |
Friends | |
| auto | c_cast (Model const &x) -> clingo_model_t * |
| Cast the model to its C representation. | |
Class to provide an mutable view of a model.
The model can be extended by theory symbols or clauses added to the running search.
|
inlineexplicit |
Constructor from the underlying C representation.
| mdl | the C representation of the model |
|
inline |
Get the associated solve control object.
|
inline |
Extend the model with additional symbols.
| symbols | the symbols to extend the model with |
|
friend |
Cast the model to its C representation.
| x | the model to cast |