Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Eigen::IterScaling< _MatrixType > Class Template Reference

iterative scaling algorithm to equilibrate rows and column norms in matrices More...

#include <Scaling.h>

Public Types

typedef MatrixType::Index Index
 
typedef _MatrixType MatrixType
 
typedef MatrixType::Scalar Scalar
 

Public Member Functions

void compute (const MatrixType &mat)
 
void computeRef (MatrixType &mat)
 
 IterScaling ()
 
 IterScaling (const MatrixType &matrix)
 
VectorXd & LeftScaling ()
 
VectorXd & RightScaling ()
 
void setTolerance (double tol)
 
 ~IterScaling ()
 

Protected Member Functions

void init ()
 

Protected Attributes

ComputationInfo m_info
 
bool m_isInitialized
 
VectorXd m_left
 
MatrixType m_matrix
 
int m_maxits
 
VectorXd m_right
 
double m_tol
 

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);
Template Parameters
_MatrixTypethe 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

Definition at line 48 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

Member Typedef Documentation

◆ Index

template<typename _MatrixType >
typedef MatrixType::Index Eigen::IterScaling< _MatrixType >::Index

◆ MatrixType

template<typename _MatrixType >
typedef _MatrixType Eigen::IterScaling< _MatrixType >::MatrixType

◆ Scalar

template<typename _MatrixType >
typedef MatrixType::Scalar Eigen::IterScaling< _MatrixType >::Scalar

Constructor & Destructor Documentation

◆ IterScaling() [1/2]

template<typename _MatrixType >
Eigen::IterScaling< _MatrixType >::IterScaling ( )
inline

◆ IterScaling() [2/2]

template<typename _MatrixType >
Eigen::IterScaling< _MatrixType >::IterScaling ( const MatrixType matrix)
inline

◆ ~IterScaling()

template<typename _MatrixType >
Eigen::IterScaling< _MatrixType >::~IterScaling ( )
inline

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()

Definition at line 73 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

◆ 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()

Definition at line 149 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

◆ init()

template<typename _MatrixType >
void Eigen::IterScaling< _MatrixType >::init ( )
inlineprotected

◆ LeftScaling()

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

Get the vector to scale the rows of the matrix

Definition at line 156 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

◆ RightScaling()

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

Get the vector to scale the columns of the matrix

Definition at line 163 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

◆ setTolerance()

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

Set the tolerance for the convergence of the iterative scaling algorithm

Definition at line 170 of file unsupported/Eigen/src/IterativeSolvers/Scaling.h.

Member Data Documentation

◆ m_info

template<typename _MatrixType >
ComputationInfo Eigen::IterScaling< _MatrixType >::m_info
mutableprotected

◆ m_isInitialized

template<typename _MatrixType >
bool Eigen::IterScaling< _MatrixType >::m_isInitialized
protected

◆ m_left

template<typename _MatrixType >
VectorXd Eigen::IterScaling< _MatrixType >::m_left
protected

◆ m_matrix

template<typename _MatrixType >
MatrixType Eigen::IterScaling< _MatrixType >::m_matrix
protected

◆ m_maxits

template<typename _MatrixType >
int Eigen::IterScaling< _MatrixType >::m_maxits
protected

◆ m_right

template<typename _MatrixType >
VectorXd Eigen::IterScaling< _MatrixType >::m_right
protected

◆ m_tol

template<typename _MatrixType >
double Eigen::IterScaling< _MatrixType >::m_tol
protected

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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:49