7#include <proxsuite-nlp/linalg/bunchkaufman.hpp>
9#include <Eigen/Cholesky>
21template <
class T,
class A>
28template <
class T,
class A>
30 size_t i0,
size_t i1) {
51 Vtt(nth, nth),
vt(nth) {
77 Eigen::PartialPivLU<MatrixXs>
Efact;
93 using RowMatrixXs = Eigen::Matrix<Scalar, -1, -1, Eigen::RowMajor>;
114 const Scalar mudyn,
const Scalar mueq,
120 const std::optional<ConstVectorRef> &theta_);
123 value_t &vn,
const Scalar mudyn,
132 const std::optional<ConstVectorRef> &theta_ = std::nullopt);
138#include "./riccati-impl.hxx"
140#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
141#include "./riccati-impl.txx"
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.
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.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
static bool backwardImpl(boost::span< const KnotType > stages, const Scalar mudyn, const Scalar mueq, boost::span< StageFactorType > datas)
Eigen::Ref< const RowMatrixXs > ConstRowMatrixRef
static void terminalSolve(const KnotType &model, const Scalar mueq, StageFactorType &d)
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.
typename StageFactor< Scalar >::value_t value_t
static void stageKernelSolve(const KnotType &model, StageFactorType &d, value_t &vn, const Scalar mudyn, const Scalar mueq)
static void computeInitial(VectorRef x0, VectorRef lbd0, const kkt0_t &kkt0, const std::optional< ConstVectorRef > &theta_)
Solve initial stage.
Eigen::Matrix< Scalar, -1, -1, Eigen::RowMajor > RowMatrixXs
Eigen::Ref< RowMatrixXs > RowMatrixRef
value_t(uint nx, uint nth)
Per-node struct for all computations in the factorization.
BlkMatrix< RowMatrixXs, 4, 1 > fth
Eigen::Matrix< Scalar, -1, -1, Eigen::RowMajor > RowMatrixXs
Eigen::PartialPivLU< MatrixXs > Efact
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
BlkMatrix< VectorXs, 4, 1 > ff
Eigen::LLT< MatrixXs > schurChol
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)