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

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

Public Types

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

Public Member Functions

void compute (const SparseMatrix &lower)
 
void apply (const SparseMatrix &lower, SparseMatrix &scaled) const
 
const DenseVector & scale () const
 

Detailed Description

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

Ruiz equilibration of a symmetric sparse matrix stored as its lower triangle.

Computes a diagonal S such that every row of S A S has its largest entry close to 1.

Template Parameters
ScalarScalar type.

Member Function Documentation

◆ apply()

template<typename Scalar >
void slp::RuizEquilibration< Scalar >::apply ( const SparseMatrix &  lower,
SparseMatrix &  scaled 
) const
inline

Writes S A S into a matrix with the same sparsity pattern as A.

Parameters
lowerA's lower triangle.
scaledThe lower triangle of S A S. Its sparsity pattern must already match lower's.

◆ compute()

template<typename Scalar >
void slp::RuizEquilibration< Scalar >::compute ( const SparseMatrix &  lower)
inline

Computes the equilibration of a symmetric matrix.

Parameters
lowerThe matrix's lower triangle.

◆ scale()

template<typename Scalar >
const DenseVector & slp::RuizEquilibration< Scalar >::scale ( ) const
inline

Returns the diagonal of S.

Returns
The diagonal of S.

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