delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
FormulaKind.cpp
1
6#include "delpi/symbolic/FormulaKind.h"
7
8#include <ostream>
9
10#include "delpi/util/error.h"
11
12namespace delpi {
13
15 switch (kind) {
16 case FormulaKind::Gt:
17 return FormulaKind::Lt;
19 return FormulaKind::Leq;
20 case FormulaKind::Lt:
21 return FormulaKind::Gt;
23 return FormulaKind::Geq;
24 default:
25 return kind;
26 }
27}
29 switch (kind) {
30 case FormulaKind::Eq:
31 return FormulaKind::Neq;
33 return FormulaKind::Eq;
34 case FormulaKind::Gt:
35 return FormulaKind::Leq;
37 return FormulaKind::Lt;
38 case FormulaKind::Lt:
39 return FormulaKind::Geq;
41 return FormulaKind::Gt;
42 default:
43 DELPI_UNREACHABLE();
44 }
45}
46std::ostream& operator<<(std::ostream& os, const FormulaKind kind) {
47 switch (kind) {
48 case FormulaKind::Eq:
49 return os << "=";
51 return os << "!=";
52 case FormulaKind::Gt:
53 return os << ">";
55 return os << ">=";
56 case FormulaKind::Lt:
57 return os << "<";
59 return os << "<=";
60 default:
61 DELPI_UNREACHABLE();
62 }
63}
64
65} // namespace delpi
Global namespace for the delpi library.
FormulaKind
Kinds of symbolic formulas.
Definition FormulaKind.h:14
LpRowSense operator!(const LpRowSense sense)
Invert the sense with delta == 0.
LpRowSense operator-(const LpRowSense sense)
Invert the sense with delta > 0.