32 std::vector<VectorXs>
xs;
34 std::vector<VectorXs>
us;
42 return this->gains_[i].col(0);
47 return this->gains_[i].col(0);
52 return this->gains_[i].rightCols(this->get_ndx1(i));
57 return this->gains_[i].rightCols(this->get_ndx1(i));
61 const std::size_t N =
us.size();
62 std::vector<MatrixXs> out;
64 for (std::size_t i = 0; i < N; i++) {
65 const Eigen::Index nu =
us[i].rows();
72 const std::size_t N =
us.size();
73 std::vector<VectorXs> out;
75 for (std::size_t i = 0; i < N; i++) {
76 const Eigen::Index nu =
us[i].rows();
86 Eigen::Index get_ndx1(std::size_t i)
const {
87 return this->gains_[i].cols() - 1;
91template <
typename Scalar>
93 return fmt::format(
"\n num_iters: {:d},"
95 "\n traj. cost: {:.3e},"
96 "\n merit.value: {:.3e},"
97 "\n prim_infeas: {:.3e},"
98 "\n dual_infeas: {:.3e},",
103template <
typename Scalar>
106 return oss <<
"Results {" << self.
printBase() <<
"\n}";
109#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
110extern template struct ResultsBaseTpl<context::Scalar>;
std::ostream & operator<<(std::ostream &oss, const StageFunctionDataTpl< T > &self)
std::vector< VectorXs > us
bool isInitialized() const
std::vector< VectorXs > getCtrlFeedforwards() const
std::string printBase() const
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
virtual ~ResultsBaseTpl()=default
decltype(auto) getFeedback(std::size_t i) const
Get expression of the primal-dual feedback gains.
decltype(auto) getFeedforward(std::size_t i)
Get column expression of the primal-dual feedforward gain.
std::vector< VectorXs > xs
std::vector< MatrixXs > gains_
std::vector< MatrixXs > getCtrlFeedbacks() const
decltype(auto) getFeedforward(std::size_t i) const
Get column expression of the primal-dual feedforward gain.
decltype(auto) getFeedback(std::size_t i)
Get expression of the primal-dual feedback gains.