|
Clingo
|
A trail is a sequence of solver literals. More...
#include <propagate.hh>
Public Types | |
| using | value_type = SolverLiteral |
| The value type is a solver literal. | |
| using | size_type = std::size_t |
| The size type. | |
| using | difference_type = std::ptrdiff_t |
| The difference type. | |
| using | reference = value_type |
| The reference type, which simply refers to the value type. | |
| using | pointer = Detail::ArrowProxy< value_type > |
| The pointer type, which is a proxy to the value type. | |
| using | iterator = Detail::RandomAccessIterator< Trail > |
| The iterator type, which is a random access iterator over the trail. | |
Public Member Functions | |
| Trail (clingo_assignment_t const *assignment) | |
| Construct a trail from the underlying C representation. | |
| auto | at (size_type index) const -> value_type |
| Get the literal at the given index in the trail. | |
| auto | operator[] (size_type index) const -> value_type |
| Get the literal at the given index in the trail. | |
| auto | size () const -> size_type |
| Get the size of the trail. | |
| auto | begin () const -> iterator |
| Get an iterator to the beginning of the trail. | |
| auto | end () const -> iterator |
| Get an iterator to the end of the trail. | |
| auto | begin (ProgramId level) const -> iterator |
| Get an iterator to the beginning of the given decision level. | |
| auto | end (ProgramId level) const -> iterator |
| Get an iterator to the end of the given decision level. | |
| auto | level (ProgramId level) const |
| Get the subrange of the literals of the given decision level. | |
A trail is a sequence of solver literals.
Literals in the trail are ordered by decision levels, where the first literal with a larger level than the previous literals is a decision; the following literals with the same level are implied by this decision literal. Each decision level up to and including the current decision level has a valid offset in the trail.
|
inlineexplicit |
Construct a trail from the underlying C representation.
For internal use.
| assignment | the C representation of the assignment object |
|
inline |
Get the literal at the given index in the trail.
| index | the index of the literal |
|
inline |
Get an iterator to the beginning of the trail.
Get an iterator to the beginning of the given decision level.
| level | the decision level to get the literals for |
|
inline |
Get an iterator to the end of the trail.
Get an iterator to the end of the given decision level.
| level | the decision level to get the literals for |
|
inline |
Get the subrange of the literals of the given decision level.
| level | the decision level to get the literals for |
|
inline |
Get the literal at the given index in the trail.
| index | the index of the literal |
|
inline |
Get the size of the trail.