dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
Bound.h
1
7#pragma once
8
9#include <utility>
10
11#include "dlinear/libs/libgmp.h"
12#include "dlinear/solver/LpColBound.h"
13#include "dlinear/symbolic/literal.h"
14
15namespace dlinear {
16
24struct Bound {
25 Bound() = default;
26 Bound(const mpq_class* value_, LpColBound lp_bound_, Literal theory_literal_, LiteralSet explanation_)
27 : value{value_},
28 lp_bound{lp_bound_},
29 theory_literal{std::move(theory_literal_)},
30 explanation{std::move(explanation_)} {}
31 Bound(const mpq_class* value_, LpColBound lp_bound_, Literal theory_literal_)
32 : value{value_}, lp_bound{lp_bound_}, theory_literal{std::move(theory_literal_)}, explanation{} {}
33
34 const mpq_class* value;
38
39 std::strong_ordering operator<=>(const Bound& other) const;
40 bool operator==(const Bound& other) const;
41};
42
43std::ostream& operator<<(std::ostream& os, const Bound& bound);
44
45} // namespace dlinear
46
47#ifdef DLINEAR_INCLUDE_FMT
48
49#include "dlinear/util/logging.h"
50
51OSTREAM_FORMATTER(dlinear::Bound)
52
53#endif
Global namespace for the dlinear library.
LpColBound
Describe the bound of a linear program variable.
Definition LpColBound.h:21
std::set< Literal > LiteralSet
A set of literals.
Definition literal.h:28
Tuple containing the value, bound type and theory literal associated with the bound.
Definition Bound.h:24
LiteralSet explanation
Explanation for the existence of the bound (e.g. propagation)
Definition Bound.h:37
LpColBound lp_bound
Type of the bound (e.g. L, SL, U, SU)
Definition Bound.h:35
Literal theory_literal
Theory literal associated with the bound.
Definition Bound.h:36
const mpq_class * value
Value of the bound.
Definition Bound.h:34
A literal is a variable with an associated truth value, indicating whether it is true or false.
Definition literal.h:24