The model class.
More...
#include <solver.hh>
◆ contains()
auto CppClingo::Control::Model::contains |
( |
Symbol |
sym | ) |
const -> bool |
|
inline |
Check if the model contains a (symbolic) atom.
- Parameters
-
sym | The symbol representing the atom. |
- Returns
- whether the atom is contained
◆ context()
auto CppClingo::Control::Model::context |
( |
| ) |
-> SolveControl & |
|
inline |
Get the context object to control the search.
- Returns
- the context object
◆ costs()
auto CppClingo::Control::Model::costs |
( |
| ) |
const -> std::span<prg_sum_t const> |
|
inline |
Get the costs associated with a model.
- Returns
- the costs
◆ is_consequence()
Check whether the given literal is a consequence.
- Parameters
-
- Returns
- whether the literal is a consequence
◆ is_true()
auto CppClingo::Control::Model::is_true |
( |
prg_lit_t |
lit | ) |
const -> bool |
|
inline |
Check if a program literal is true in a model.
- Parameters
-
- Returns
- whether the literal is true
◆ number()
auto CppClingo::Control::Model::number |
( |
| ) |
const -> uint64_t |
|
inline |
Get the running number of the model.
- Returns
- the number
◆ optimality_proven()
auto CppClingo::Control::Model::optimality_proven |
( |
| ) |
const -> bool |
|
inline |
Check if the model corresponds to an optimal solution.
- Returns
- whether the model is optimal
◆ priorities()
auto CppClingo::Control::Model::priorities |
( |
| ) |
const -> std::span<prg_weight_t const> |
|
inline |
get the priorities of the costs.
- Returns
- the priorities
◆ symbols()
Get the selected symbols in the model.
- Parameters
-
type | which symbols to select |
res | a vector to store the symbols |
◆ thread_id()
auto CppClingo::Control::Model::thread_id |
( |
| ) |
const -> prg_id_t |
|
inline |
Get the solver/thread id the model was found in.
- Returns
- the thread id
◆ type()
auto CppClingo::Control::Model::type |
( |
| ) |
const -> ModelType |
|
inline |
Get the type of the model.
- Returns
- the type
The documentation for this class was generated from the following file: