11#include <Eigen/Cholesky>
21template <
class T,
class A>
28template <
class T,
class A>
30 size_t i0,
size_t i1) {
81 Eigen::PartialPivLU<MatrixXs>
Efact;
107 :
mat({nx, nc}, {nx, nc})
116 const Scalar mudyn,
const Scalar mueq,
117 boost::span<StageFactorType> datas);
121 const std::optional<ConstVectorRef> &theta_);
125 const Scalar mudyn,
const Scalar mueq);
130 boost::span<const StageFactorType> datas,
131 boost::span<VectorXs> xs, boost::span<VectorXs> us,
132 boost::span<VectorXs> vs, boost::span<VectorXs> lbdas,
133 const std::optional<ConstVectorRef> &theta_ = std::nullopt);
136#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
Block matrix class, with a fixed-size number of row and column blocks.
const row_dim_t & rowDims() const
boost::span< T > make_span_from_indices(std::vector< T, A > &vec, size_t i0, size_t i1)
Create a boost::span object from a vector and two indices.
constexpr span< I > make_span(I *f, std::size_t c) noexcept
Struct describing a stage of a constrained LQ problem.
__view_base< true > const_view_t
Eigen::BunchKaufman< MatrixXs > chol
kkt0_t(uint nx, uint nc, uint nth)
BlkMatrix< RowMatrixXs, 2, 1 > fth
BlkMatrix< VectorXs, 2, 1 > ff
BlkMatrix< MatrixXs, 2, 2 > mat
Kernel for use in Riccati-like algorithms for the proximal LQ subproblem.
static bool backwardImpl(boost::span< const KnotType > stages, const Scalar mudyn, const Scalar mueq, boost::span< StageFactorType > datas)
static bool forwardImpl(boost::span< const KnotType > stages, boost::span< const StageFactorType > datas, boost::span< VectorXs > xs, boost::span< VectorXs > us, boost::span< VectorXs > vs, boost::span< VectorXs > lbdas, const std::optional< ConstVectorRef > &theta_=std::nullopt)
Forward sweep.
static void stageKernelSolve(typename KnotType::const_view_t model, StageFactorType &d, value_t &vn, const Scalar mudyn, const Scalar mueq)
LqrKnotTpl< Scalar > KnotType
typename StageFactor< Scalar >::value_t value_t
ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES(Scalar)
static void computeInitial(VectorRef x0, VectorRef lbd0, const kkt0_t &kkt0, const std::optional< ConstVectorRef > &theta_)
Solve initial stage.
StageFactor< Scalar > StageFactorType
static void terminalSolve(typename KnotType::const_view_t model, const Scalar mueq, StageFactorType &d)
value_t(uint nx, uint nth)
Per-node struct for all computations in the factorization.
BlkMatrix< RowMatrixXs, 4, 1 > fth
Eigen::PartialPivLU< MatrixXs > Efact
BlkMatrix< VectorXs, 4, 1 > ff
Eigen::LLT< MatrixXs > schurChol
ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES(Scalar)
BlkMatrix< RowMatrixXs, 4, 1 > fb
Eigen::BunchKaufman< MatrixXs > kktChol
BlkMatrix< MatrixXs, 2, 2 > kktMat
StageFactor(uint nx, uint nu, uint nc, uint nx2, uint nth)