dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
LpResult.cpp
1
6#include "LpResult.h"
7
8#include "dlinear/util/exception.h"
9
10namespace dlinear {
11
12LpResult parseLogic(const int res) {
13 switch (res) {
14 case 0:
16 case 1:
18 default:
19 DLINEAR_UNREACHABLE();
20 }
21}
22
23std::ostream &operator<<(std::ostream &os, const LpResult &logic) {
24 switch (logic) {
26 return os << "no-result";
28 return os << "unsolved";
30 return os << "infeasible";
32 return os << "unbounded";
34 return os << "optimal";
36 return os << "delta-optimal";
37 default:
38 DLINEAR_UNREACHABLE();
39 }
40}
41
42} // namespace dlinear
Global namespace for the dlinear library.
LpResult
Result of running the LP solver over the input problem.
Definition LpResult.h:14
@ LP_INFEASIBLE
The problem is infeasible.
@ LP_NO_RESULT
No result has been obtained yet.
@ LP_UNBOUNDED
The problem is unbounded.
@ LP_UNSOLVED
The problem has not been solved. An error may have occurred.
@ LP_DELTA_OPTIMAL
The problem has been solved optimally, but with a delta.
@ LP_OPTIMAL
The problem has been solved optimally.
Logic parseLogic(const std::string &s)
Parse the logic from a string.
Definition Logic.cpp:12