|
|
dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
BoundIterator class. More...
#include <BoundIterator.h>
Public Member Functions | |
| BoundIterator () | |
| Construct an empty iterator. | |
| BoundIterator (internal_iterator begin_bounds_it, internal_iterator end_bounds_it) | |
Construct an iterator from a pair of iterators, begin_bounds_it and end_bounds_it. | |
| BoundIterator (std::pair< internal_iterator, internal_iterator > bounds) | |
Construct an iterator from a pair of iterators, bounds. | |
| BoundIterator (internal_iterator begin_bounds_it, internal_iterator end_bounds_it, internal_iterator begin_nq_bounds_it, internal_iterator end_nq_bounds_it) | |
Construct an iterator from a pair of iterators to the standard bounds, begin_bounds_it and end_bounds_it, and a pair of iterators to the non-equal bounds, begin_nq_bounds_it and end_nq_bounds_it. | |
| BoundIterator (std::pair< internal_iterator, internal_iterator > bounds, std::pair< internal_iterator, internal_iterator > nq_bounds) | |
Construct an iterator from a pair of iterators to the standard bounds, bounds, and a pair of iterators to the non-equal bounds, nq_bounds. | |
| std::pair< internal_iterator, internal_iterator > | bounds () const |
| Return the pair of iterators to the bounds. | |
| std::pair< internal_iterator, internal_iterator > | nq_bounds () const |
| Return the pair of iterators to the non-equal bounds. | |
| std::size_t | bounds_size () const |
| Number of bounds included between the begin and end iterators. | |
| std::size_t | nq_bounds_size () const |
| Number of non-equal bounds included between the begin and end iterators. | |
| bool | bounds_empty () const |
| Check if the iterator does not point to any bound. | |
| bool | nq_bounds_empty () const |
| Check if the iterator does not point to any non-equal bound. | |
| bool | empty () const |
| Check if the iterator does not point to any bound. | |
| std::size_t | size () const |
| Number of bounds of any kind included between the begin and end iterators. | |
| internal_iterator | begin () const |
| Get read-only access to the begin iterator of the BoundIterator. | |
| internal_iterator | end () const |
| Get read-only access to the end iterator of the BoundIterator. | |
| LiteralSet | explanation () const |
| Produce and explanation formed by all the theory literals present in the violation. | |
| void | explanation (LiteralSet &explanation) const |
| Produce and explanation formed by all the theory literals present in the violation. | |
| std::set< LiteralSet > | explanations (const std::optional< Literal > &lit={}) const |
| Produce a set of explanations. | |
| void | explanations (std::set< LiteralSet > &explanations, const std::optional< Literal > &lit={}) const |
| Produce a set of explanations. | |
Static Private Attributes | |
| static const vector_type | default_empty_vector_ {} |
| Default empty vector. Used for default construction. | |
BoundIterator class.
It is used to iterate over the bounds of a theory solver without copying each BoundVector::Bound. Can be returned as a result of a bound violation or to iterate over the active bounds. It allows to iterate over the two types of bounds: standard and non-equal as if they were a single container.
Definition at line 43 of file BoundIterator.h.
| dlinear::BoundIterator::BoundIterator | ( | BoundIterator::internal_iterator | begin_bounds_it, |
| BoundIterator::internal_iterator | end_bounds_it ) |
Construct an iterator from a pair of iterators, begin_bounds_it and end_bounds_it.
| begin_bounds_it | begin iterator to the first bound |
| end_bounds_it | end iterator of the bounds |
Definition at line 58 of file BoundIterator.cpp.
|
explicit |
Construct an iterator from a pair of iterators, bounds.
| bounds | pair of iterators to the bounds, begin and end |
Definition at line 70 of file BoundIterator.cpp.
| dlinear::BoundIterator::BoundIterator | ( | BoundIterator::internal_iterator | begin_bounds_it, |
| BoundIterator::internal_iterator | end_bounds_it, | ||
| BoundIterator::internal_iterator | begin_nq_bounds_it, | ||
| BoundIterator::internal_iterator | end_nq_bounds_it ) |
Construct an iterator from a pair of iterators to the standard bounds, begin_bounds_it and end_bounds_it, and a pair of iterators to the non-equal bounds, begin_nq_bounds_it and end_nq_bounds_it.
| begin_bounds_it | begin iterator to the first bound |
| end_bounds_it | end iterator of the bounds |
| begin_nq_bounds_it | begin iterator to the first non-equal bound |
| end_nq_bounds_it | end iterator of the non-equal bounds |
Definition at line 31 of file BoundIterator.cpp.
| dlinear::BoundIterator::BoundIterator | ( | std::pair< internal_iterator, internal_iterator > | bounds, |
| std::pair< internal_iterator, internal_iterator > | nq_bounds ) |
Construct an iterator from a pair of iterators to the standard bounds, bounds, and a pair of iterators to the non-equal bounds, nq_bounds.
| bounds | begin and end iterators to the bounds |
| nq_bounds | begin and end iterators to the non-equal bounds |
Definition at line 46 of file BoundIterator.cpp.
|
inlinenodiscard |
Get read-only access to the begin iterator of the BoundIterator.
Definition at line 153 of file BoundIterator.h.
|
inlinenodiscard |
Return the pair of iterators to the bounds.
Definition at line 106 of file BoundIterator.h.
|
inlinenodiscard |
Check if the iterator does not point to any bound.
Definition at line 130 of file BoundIterator.h.
|
inlinenodiscard |
Number of bounds included between the begin and end iterators.
Definition at line 118 of file BoundIterator.h.
|
inlinenodiscard |
Check if the iterator does not point to any bound.
Definition at line 144 of file BoundIterator.h.
|
inlinenodiscard |
Get read-only access to the end iterator of the BoundIterator.
Definition at line 155 of file BoundIterator.h.
|
nodiscard |
Produce and explanation formed by all the theory literals present in the violation.
It puts in a single set all the explanations and literals of all the bounds.
Definition at line 114 of file BoundIterator.cpp.
| void dlinear::BoundIterator::explanation | ( | LiteralSet & | explanation | ) | const |
Produce and explanation formed by all the theory literals present in the violation.
It puts in a single set all the explanations and literals of all the bounds.
| explanation[out] | set to store the explanation |
Definition at line 119 of file BoundIterator.cpp.
|
nodiscard |
Produce a set of explanations.
Each of the explanations is produced from a single bound of the violation, putting together its explanation and literal. If lit is present, it will be added to every explanation.
| lit | if specified, it is added to all explanations |
Definition at line 131 of file BoundIterator.cpp.
| void dlinear::BoundIterator::explanations | ( | std::set< LiteralSet > & | explanations, |
| const std::optional< Literal > & | lit = {} ) const |
Produce a set of explanations.
Each of the explanations is produced from a single bound of the violation, putting together its explanation and literal. If lit is present, it will be added to every explanation.
| explanations[out] | set to store the explanations |
| lit | if specified, it is added to all explanations |
Definition at line 136 of file BoundIterator.cpp.
|
inlinenodiscard |
Return the pair of iterators to the non-equal bounds.
Definition at line 111 of file BoundIterator.h.
|
inlinenodiscard |
Check if the iterator does not point to any non-equal bound.
Definition at line 137 of file BoundIterator.h.
|
inlinenodiscard |
Number of non-equal bounds included between the begin and end iterators.
Definition at line 123 of file BoundIterator.h.
|
inlinenodiscard |
Number of bounds of any kind included between the begin and end iterators.
Definition at line 150 of file BoundIterator.h.