diff options
Diffstat (limited to 'Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h')
-rw-r--r-- | Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h index f66c846ef..a117fc155 100644 --- a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +++ b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h @@ -10,7 +10,7 @@ #ifndef EIGEN_BASIC_PRECONDITIONERS_H #define EIGEN_BASIC_PRECONDITIONERS_H -namespace Eigen { +namespace Eigen { /** \ingroup IterativeLinearSolvers_Module * \brief A preconditioner based on the digonal entries @@ -52,15 +52,15 @@ class DiagonalPreconditioner compute(mat); } - Index rows() const { return m_invdiag.size(); } - Index cols() const { return m_invdiag.size(); } - + EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_invdiag.size(); } + EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_invdiag.size(); } + template<typename MatType> DiagonalPreconditioner& analyzePattern(const MatType& ) { return *this; } - + template<typename MatType> DiagonalPreconditioner& factorize(const MatType& mat) { @@ -77,7 +77,7 @@ class DiagonalPreconditioner m_isInitialized = true; return *this; } - + template<typename MatType> DiagonalPreconditioner& compute(const MatType& mat) { @@ -99,7 +99,7 @@ class DiagonalPreconditioner && "DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b"); return Solve<DiagonalPreconditioner, Rhs>(*this, b.derived()); } - + ComputationInfo info() { return Success; } protected: @@ -121,7 +121,7 @@ class DiagonalPreconditioner * \implsparsesolverconcept * * The diagonal entries are pre-inverted and stored into a dense vector. - * + * * \sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner */ template <typename _Scalar> @@ -146,7 +146,7 @@ class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar> { return *this; } - + template<typename MatType> LeastSquareDiagonalPreconditioner& factorize(const MatType& mat) { @@ -178,13 +178,13 @@ class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar> Base::m_isInitialized = true; return *this; } - + template<typename MatType> LeastSquareDiagonalPreconditioner& compute(const MatType& mat) { return factorize(mat); } - + ComputationInfo info() { return Success; } protected: @@ -205,19 +205,19 @@ class IdentityPreconditioner template<typename MatrixType> explicit IdentityPreconditioner(const MatrixType& ) {} - + template<typename MatrixType> IdentityPreconditioner& analyzePattern(const MatrixType& ) { return *this; } - + template<typename MatrixType> IdentityPreconditioner& factorize(const MatrixType& ) { return *this; } template<typename MatrixType> IdentityPreconditioner& compute(const MatrixType& ) { return *this; } - + template<typename Rhs> inline const Rhs& solve(const Rhs& b) const { return b; } - + ComputationInfo info() { return Success; } }; |