20template <
typename _Scalar>
struct ResultsTpl {
21 using Scalar = _Scalar;
24 using VecBool = Eigen::Matrix<bool, Eigen::Dynamic, 1>;
26 ConvergenceFlag converged = SUCCESS;
31 VectorXs data_lams_opt;
44 std::size_t al_iters = 0;
48 ResultsTpl(
const Problem &prob)
49 : x_opt(prob.manifold_->neutral()),
50 data_lams_opt(prob.getTotalConstraintDim()),
61 friend std::ostream &operator<<(std::ostream &oss,
63 oss <<
"Results {" << fmt::format(
"\n convergence: {},", self.converged)
64 << fmt::format(
"\n merit: {:.3e},", self.merit)
65 << fmt::format(
"\n value: {:.3e},", self.value)
66 << fmt::format(
"\n num_iters: {:d},", self.
num_iters)
67 << fmt::format(
"\n mu: {:.3e},", self.mu)
68 << fmt::format(
"\n rho: {:.3e},", self.rho)
69 << fmt::format(
"\n dual_infeas: {:.3e},", self.
dual_infeas)
70 << fmt::format(
"\n prim_infeas: {:.3e},", self.
prim_infeas)
71 << fmt::format(
"\n cstr_values: {}",
73 for (std::size_t i = 0; i < self.
active_set.size(); i++) {
74 oss << fmt::format(
"\n activeSet[{:d}]: {}", i,
void allocateMultipliersOrResiduals(const ProblemTpl< Scalar > &prob, typename math_types< Scalar >::VectorXs &data, typename math_types< Scalar >::VectorOfRef &out)
Allocate a set of multipliers (or residuals) for a given problem instance.