diff --git a/Eigen/IterativeLinearSolvers b/Eigen/IterativeLinearSolvers index 0594feb41..7fab9eed0 100644 --- a/Eigen/IterativeLinearSolvers +++ b/Eigen/IterativeLinearSolvers @@ -12,7 +12,7 @@ * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. * Those solvers are accessible via the following classes: * - ConjugateGradient for selfadjoint (hermitian) matrices, - * - LSCG for rectangular least-square problems, + * - LeastSquaresConjugateGradient for rectangular least-square problems, * - BiCGSTAB for general square matrices. * * These iterative solvers are associated with some preconditioners: diff --git a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h index 6da423cf6..3710a8209 100644 --- a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +++ b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h @@ -102,7 +102,7 @@ class DiagonalPreconditioner }; /** \ingroup IterativeLinearSolvers_Module - * \brief Jacobi preconditioner for LSCG + * \brief Jacobi preconditioner for LeastSquaresConjugateGradient * * This class allows to approximately solve for A' A x = A' b problems assuming A' A is a diagonal matrix. * In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for: @@ -114,7 +114,7 @@ class DiagonalPreconditioner * * The diagonal entries are pre-inverted and stored into a dense vector. * - * \sa class LSCG, class DiagonalPreconditioner + * \sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner */ template class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar> diff --git a/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h b/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h index fab5fdb1f..11b8347f7 100644 --- a/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +++ b/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h @@ -139,7 +139,7 @@ struct traits > * By default the iterations start with x=0 as an initial guess of the solution. * One can control the start using the solveWithGuess() method. * - * \sa class LSCG, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner + * \sa class LeastSquaresConjugateGradient, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ template< typename _MatrixType, int _UpLo, typename _Preconditioner> class ConjugateGradient : public IterativeSolverBase > diff --git a/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h b/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h index beaf5c307..1d819927e 100644 --- a/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +++ b/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h @@ -95,12 +95,12 @@ void least_square_conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest template< typename _MatrixType, typename _Preconditioner = LeastSquareDiagonalPreconditioner > -class LSCG; +class LeastSquaresConjugateGradient; namespace internal { template< typename _MatrixType, typename _Preconditioner> -struct traits > +struct traits > { typedef _MatrixType MatrixType; typedef _Preconditioner Preconditioner; @@ -129,7 +129,7 @@ struct traits > VectorXd x(n), b(m); SparseMatrix A(m,n); // fill A and b - LSCG > lscg; + LeastSquaresConjugateGradient > lscg; lscg.compute(A); x = lscg.solve(b); std::cout << "#iterations: " << lscg.iterations() << std::endl; @@ -144,9 +144,9 @@ struct traits > * \sa class ConjugateGradient, SparseLU, SparseQR */ template< typename _MatrixType, typename _Preconditioner> -class LSCG : public IterativeSolverBase > +class LeastSquaresConjugateGradient : public IterativeSolverBase > { - typedef IterativeSolverBase Base; + typedef IterativeSolverBase Base; using Base::mp_matrix; using Base::m_error; using Base::m_iterations; @@ -161,7 +161,7 @@ public: public: /** Default constructor. */ - LSCG() : Base() {} + LeastSquaresConjugateGradient() : Base() {} /** Initialize the solver with matrix \a A for further \c Ax=b solving. * @@ -173,9 +173,9 @@ public: * this class becomes invalid. Call compute() to update it with the new * matrix A, or modify a copy of A. */ - explicit LSCG(const MatrixType& A) : Base(A) {} + explicit LeastSquaresConjugateGradient(const MatrixType& A) : Base(A) {} - ~LSCG() {} + ~LeastSquaresConjugateGradient() {} /** \internal */ template diff --git a/test/lscg.cpp b/test/lscg.cpp index 599ed5619..daa62a954 100644 --- a/test/lscg.cpp +++ b/test/lscg.cpp @@ -12,8 +12,8 @@ template void test_lscg_T() { - LSCG > lscg_colmajor_diag; - LSCG, IdentityPreconditioner> lscg_colmajor_I; + LeastSquaresConjugateGradient > lscg_colmajor_diag; + LeastSquaresConjugateGradient, IdentityPreconditioner> lscg_colmajor_I; CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_diag) ); CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_I) );