delpi
0.0.1
DElta-complete LP solver
Toggle main menu visibility
Loading...
Searching...
No Matches
Row.cpp
1
6
#include "delpi/solver/Row.h"
7
8
#include <ostream>
9
#include <sstream>
10
11
namespace
delpi
{
12
13
std::ostream& operator<<(std::ostream& os,
const
Row
& row) {
14
os <<
"Row{ "
;
15
bool
print_plus =
false
;
16
for
(
const
auto
& [var, coeff] : row.addends) {
17
os << (print_plus ?
" + "
:
""
);
18
if
(coeff != 1) os << coeff <<
" * "
;
19
os << var;
20
print_plus =
true
;
21
}
22
return
os <<
" in [ "
<< (row.lb.has_value() ? (std::stringstream{} << row.lb.value()).str() :
"-inf"
) <<
" , "
23
<< (row.ub.has_value() ? (std::stringstream{} << row.ub.value()).str() :
"inf"
) <<
" ] }"
;
24
}
25
26
}
// namespace delpi
delpi
Global namespace for the delpi library.
delpi::Row
Structure representing a row in the LP solver in the form of a linear combination of variables.
Definition
Row.h:24
delpi
solver
Row.cpp
Generated by
1.17.0