Sleipnir C++ API
Loading...
Searching...
No Matches
slp::SparseRegularizedLDLT< Scalar > Class Template Reference

#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/optimization/solver/util/sparse_regularized_ldlt.hpp>

Public Types

using DenseVector = Eigen::Vector< Scalar, Eigen::Dynamic >
 Type alias for dense vector.
 
using SparseMatrix = Eigen::SparseMatrix< Scalar >
 Type alias for sparse matrix.
 

Public Member Functions

 SparseRegularizedLDLT (int num_decision_variables, int num_equality_constraints)
 
 SparseRegularizedLDLT (int num_decision_variables, int num_equality_constraints, Scalar γ_min)
 
Eigen::ComputationInfo info () const
 
SparseRegularizedLDLTcompute (const SparseMatrix &lhs)
 
template<typename Rhs >
DenseVector solve (const Eigen::MatrixBase< Rhs > &rhs) const
 
template<typename Rhs >
DenseVector solve (const Eigen::SparseMatrixBase< Rhs > &rhs) const
 
Scalar hessian_regularization () const
 
Scalar constraint_jacobian_regularization () const
 

Detailed Description

template<typename Scalar>
class slp::SparseRegularizedLDLT< Scalar >

Solves sparse systems of linear equations using a regularized LDLT factorization.

Template Parameters
ScalarScalar type.

Constructor & Destructor Documentation

◆ SparseRegularizedLDLT() [1/2]

template<typename Scalar >
slp::SparseRegularizedLDLT< Scalar >::SparseRegularizedLDLT ( int  num_decision_variables,
int  num_equality_constraints 
)
inline

Constructs a SparseRegularizedLDLT instance.

Parameters
num_decision_variablesThe number of decision variables in the system.
num_equality_constraintsThe number of equality constraints in the system.

◆ SparseRegularizedLDLT() [2/2]

template<typename Scalar >
slp::SparseRegularizedLDLT< Scalar >::SparseRegularizedLDLT ( int  num_decision_variables,
int  num_equality_constraints,
Scalar  γ_min 
)
inline

Constructs a SparseRegularizedLDLT instance.

Parameters
num_decision_variablesThe number of decision variables in the system.
num_equality_constraintsThe number of equality constraints in the system.
γ_minThe minimum constraint regularization.

Member Function Documentation

◆ compute()

template<typename Scalar >
SparseRegularizedLDLT & slp::SparseRegularizedLDLT< Scalar >::compute ( const SparseMatrix lhs)
inline

Computes the regularized LDLT factorization of a matrix.

The matrix's symbolic decomposition is reused in subsequent calls, so subsequent calls must be given a matrix with the same sparsity pattern.

Parameters
lhsLeft-hand side of the system.
Returns
The factorization.

◆ constraint_jacobian_regularization()

template<typename Scalar >
Scalar slp::SparseRegularizedLDLT< Scalar >::constraint_jacobian_regularization ( ) const
inline

Returns the constraint Jacobian regularization factor.

Returns
Constraint Jacobian regularization factor.

◆ hessian_regularization()

template<typename Scalar >
Scalar slp::SparseRegularizedLDLT< Scalar >::hessian_regularization ( ) const
inline

Returns the Hessian regularization factor.

Returns
Hessian regularization factor.

◆ info()

template<typename Scalar >
Eigen::ComputationInfo slp::SparseRegularizedLDLT< Scalar >::info ( ) const
inline

Reports whether previous computation was successful.

Returns
Whether previous computation was successful.

◆ solve() [1/2]

template<typename Scalar >
template<typename Rhs >
DenseVector slp::SparseRegularizedLDLT< Scalar >::solve ( const Eigen::MatrixBase< Rhs > &  rhs) const
inline

Solves the system of equations using a regularized LDLT factorization.

Parameters
rhsRight-hand side of the system.
Returns
The solution.

◆ solve() [2/2]

template<typename Scalar >
template<typename Rhs >
DenseVector slp::SparseRegularizedLDLT< Scalar >::solve ( const Eigen::SparseMatrixBase< Rhs > &  rhs) const
inline

Solves the system of equations using a regularized LDLT factorization.

Parameters
rhsRight-hand side of the system.
Returns
The solution.

The documentation for this class was generated from the following file: