Eigen-unsupported  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
Eigen::IterScaling< MatrixType_ > Class Template Reference

Detailed Description

template<typename MatrixType_>
class Eigen::IterScaling< MatrixType_ >

iterative scaling algorithm to equilibrate rows and column norms in matrices

This class can be used as a preprocessing tool to accelerate the convergence of iterative methods

This feature is useful to limit the pivoting amount during LU/ILU factorization The scaling strategy as presented here preserves the symmetry of the problem NOTE It is assumed that the matrix does not have empty row or column,

Example with key steps

VectorXd x(n), b(n);
SparseMatrix<double> A;
// fill A and b;
IterScaling<SparseMatrix<double> > scal;
// Compute the left and right scaling vectors. The matrix is equilibrated at output
scal.computeRef(A);
// Scale the right hand side
b = scal.LeftScaling().cwiseProduct(b);
// Now, solve the equilibrated linear system with any available solver
// Scale back the computed solution
x = scal.RightScaling().cwiseProduct(x);
Matrix< double, Dynamic, 1 > VectorXd
Template Parameters
MatrixType_the type of the matrix. It should be a real square sparsematrix

References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for Matrix Scaling, INRIA Research report RR-7552

See also
IncompleteLUT

Public Member Functions

void compute (const MatrixType &mat)
 
void computeRef (MatrixType &mat)
 
VectorXdLeftScaling ()
 
VectorXdRightScaling ()
 
void setTolerance (double tol)
 

Member Function Documentation

◆ compute()

template<typename MatrixType_ >
void Eigen::IterScaling< MatrixType_ >::compute ( const MatrixType &  mat)
inline

Compute the left and right diagonal matrices to scale the input matrix mat

FIXME This algorithm will be modified such that the diagonal elements are permuted on the diagonal.

See also
LeftScaling() RightScaling()

◆ computeRef()

template<typename MatrixType_ >
void Eigen::IterScaling< MatrixType_ >::computeRef ( MatrixType &  mat)
inline

Compute the left and right vectors to scale the vectors the input matrix is scaled with the computed vectors at output

See also
compute()

◆ LeftScaling()

template<typename MatrixType_ >
VectorXd& Eigen::IterScaling< MatrixType_ >::LeftScaling ( )
inline

Get the vector to scale the rows of the matrix

◆ RightScaling()

template<typename MatrixType_ >
VectorXd& Eigen::IterScaling< MatrixType_ >::RightScaling ( )
inline

Get the vector to scale the columns of the matrix

◆ setTolerance()

template<typename MatrixType_ >
void Eigen::IterScaling< MatrixType_ >::setTolerance ( double  tol)
inline

Set the tolerance for the convergence of the iterative scaling algorithm


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