13#ifndef INCLUDE_PIPAL_INPUT_HXX
14#define INCLUDE_PIPAL_INPUT_HXX
28 template <
typename Real>
43 static constexpr Real EPSILON{std::numeric_limits<Real>::epsilon()};
48 Mask const cond_beq((bl.array() - bu.array()).abs() <= EPSILON);
49 Mask const cond_ceq((cl.array() - cu.array()).abs() <= EPSILON);
52 i.
I1 =
find(cond_bl && cond_bu);
54 i.
I3 =
find(!cond_bl && cond_bu);
55 i.
I4 =
find(cond_bl && !cond_bu);
56 i.
I5 =
find(!cond_bl && !cond_bu && !cond_beq);
58 i.
I7 =
find(!cond_cl && cond_cu);
59 i.
I8 =
find(cond_cl && !cond_cu);
60 i.
I9 =
find(!cond_cl && !cond_cu && !cond_ceq);
102 i.
vi += (i.
l5.array() > i.
u5.array()).count();
117 i.
vi += (i.
l9.array() > i.
u9.array()).count();
130 i.
x0 << x0(i.
I1), x0(i.
I3), x0(i.
I4), x0(i.
I5);
void buildInput(std::string const &name, Vector< Real > const &x0, Vector< Real > const &bl, Vector< Real > const &bu, Vector< Real > const &cl, Vector< Real > const &cu)
Build the input data for the solver.
Definition Input.hxx:29
Input< Real > m_input
Definition Solver.hxx:44
Parameter< Real > m_parameter
Definition Solver.hxx:48
Namespace for the Pipal library.
Definition Acceptance.hxx:16
static Indices find(Mask const &mask)
Select elements from a vector based on a boolean mask.
Definition Types.hxx:133
PIPAL_DEFAULT_INTEGER_TYPE Integer
The Integer type as used for the API.
Definition Types.hxx:110
Eigen::Array< bool, Eigen::Dynamic, 1 > Mask
Definition Types.hxx:118
Eigen::Vector< Real, Eigen::Dynamic > Vector
Definition Types.hxx:112
Internal parameters for the solver algorithm.
Definition Types.hxx:229
static constexpr Real rhs_bnd
Definition Types.hxx:230