diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-10-24 09:51:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-10-24 09:51:02 +0200 |
commit | a997dacc6728157e143e772545a47bac5e920e49 (patch) | |
tree | d19048164a3b38f4148334cbf55b15d70f700119 /unsupported/Eigen/src/SparseExtra | |
parent | 39d4585bff7a69932a3d8fe0af1ad48481caac2d (diff) |
mark deprecated sparse solvers as so.
Diffstat (limited to 'unsupported/Eigen/src/SparseExtra')
6 files changed, 41 insertions, 24 deletions
diff --git a/unsupported/Eigen/src/SparseExtra/CholmodSupportLegacy.h b/unsupported/Eigen/src/SparseExtra/CholmodSupportLegacy.h index 676cd8574..33af6a176 100644 --- a/unsupported/Eigen/src/SparseExtra/CholmodSupportLegacy.h +++ b/unsupported/Eigen/src/SparseExtra/CholmodSupportLegacy.h @@ -121,6 +121,7 @@ MappedSparseMatrix<Scalar,Flags,Index> map_cholmod_sparse_to_eigen(cholmod_spars } // namespace internal +/** \deprecated use class SimplicialLDLT, or class SimplicialLLT, class ConjugateGradient */ template<typename _MatrixType> class SparseLLT<_MatrixType, Cholmod> : public SparseLLT<_MatrixType> { @@ -139,13 +140,15 @@ class SparseLLT<_MatrixType, Cholmod> : public SparseLLT<_MatrixType> typedef _MatrixType MatrixType; typedef typename MatrixType::Index Index; - SparseLLT(int flags = 0) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLLT(int flags = 0) : Base(flags), m_cholmodFactor(0) { cholmod_start(&m_cholmod); } - SparseLLT(const MatrixType& matrix, int flags = 0) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLLT(const MatrixType& matrix, int flags = 0) : Base(flags), m_cholmodFactor(0) { cholmod_start(&m_cholmod); diff --git a/unsupported/Eigen/src/SparseExtra/SparseLDLTLegacy.h b/unsupported/Eigen/src/SparseExtra/SparseLDLTLegacy.h index 6b240f169..1d60e0f1e 100644 --- a/unsupported/Eigen/src/SparseExtra/SparseLDLTLegacy.h +++ b/unsupported/Eigen/src/SparseExtra/SparseLDLTLegacy.h @@ -63,7 +63,8 @@ LDL License: #ifndef EIGEN_SPARSELDLT_LEGACY_H #define EIGEN_SPARSELDLT_LEGACY_H -/** \ingroup Sparse_Module +/** \deprecated use class SimplicialLDLT, or class SimplicialLLT, class ConjugateGradient + * \ingroup Sparse_Module * * \class SparseLDLT * @@ -94,17 +95,19 @@ class SparseLDLT typedef typename MatrixType::Index Index; typedef SparseMatrix<Scalar,ColMajor,Index> CholMatrixType; - /** Creates a dummy LDLT factorization object with flags \a flags. */ - SparseLDLT(int flags = 0) + /** \deprecated the entire class is deprecated + * Creates a dummy LDLT factorization object with flags \a flags. */ + EIGEN_DEPRECATED SparseLDLT(int flags = 0) : m_flags(flags), m_status(0) { eigen_assert((MatrixType::Flags&RowMajorBit)==0); m_precision = RealScalar(0.1) * Eigen::NumTraits<RealScalar>::dummy_precision(); } - /** Creates a LDLT object and compute the respective factorization of \a matrix using + /** \deprecated the entire class is deprecated + * Creates a LDLT object and compute the respective factorization of \a matrix using * flags \a flags. */ - SparseLDLT(const MatrixType& matrix, int flags = 0) + EIGEN_DEPRECATED SparseLDLT(const MatrixType& matrix, int flags = 0) : m_matrix(matrix.rows(), matrix.cols()), m_flags(flags), m_status(0) { eigen_assert((MatrixType::Flags&RowMajorBit)==0); diff --git a/unsupported/Eigen/src/SparseExtra/SparseLLT.h b/unsupported/Eigen/src/SparseExtra/SparseLLT.h index ac042217b..8ae116e82 100644 --- a/unsupported/Eigen/src/SparseExtra/SparseLLT.h +++ b/unsupported/Eigen/src/SparseExtra/SparseLLT.h @@ -25,7 +25,8 @@ #ifndef EIGEN_SPARSELLT_H #define EIGEN_SPARSELLT_H -/** \ingroup Sparse_Module +/** \deprecated use class SimplicialLDLT, or class SimplicialLLT, class ConjugateGradient + * \ingroup Sparse_Module * * \class SparseLLT * @@ -52,16 +53,18 @@ class SparseLLT typedef _MatrixType MatrixType; typedef typename MatrixType::Index Index; - /** Creates a dummy LLT factorization object with flags \a flags. */ - SparseLLT(int flags = 0) + /** \deprecated the entire class is deprecated + * Creates a dummy LLT factorization object with flags \a flags. */ + EIGEN_DEPRECATED SparseLLT(int flags = 0) : m_flags(flags), m_status(0) { m_precision = RealScalar(0.1) * Eigen::NumTraits<RealScalar>::dummy_precision(); } - /** Creates a LLT object and compute the respective factorization of \a matrix using + /** \deprecated the entire class is deprecated + * Creates a LLT object and compute the respective factorization of \a matrix using * flags \a flags. */ - SparseLLT(const MatrixType& matrix, int flags = 0) + EIGEN_DEPRECATED SparseLLT(const MatrixType& matrix, int flags = 0) : m_matrix(matrix.rows(), matrix.cols()), m_flags(flags), m_status(0) { m_precision = RealScalar(0.1) * Eigen::NumTraits<RealScalar>::dummy_precision(); @@ -179,7 +182,7 @@ void SparseLLT<_MatrixType,Backend>::compute(const _MatrixType& a) // TODO estimate the number of non zeros m_matrix.setZero(); - m_matrix.reserve(a.nonZeros()*2); + m_matrix.reserve(a.nonZeros()*10); for (Index j = 0; j < size; ++j) { Scalar x = internal::real(a.coeff(j,j)); @@ -222,7 +225,7 @@ void SparseLLT<_MatrixType,Backend>::compute(const _MatrixType& a) for (typename AmbiVector<Scalar,Index>::Iterator it(tempVector, m_precision*rx); it; ++it) { // FIXME use insertBack - m_matrix.insert(it.index(), j) = it.value() * y; + m_matrix.insertBack(it.index(), j) = it.value() * y; } } m_matrix.finalize(); diff --git a/unsupported/Eigen/src/SparseExtra/SparseLU.h b/unsupported/Eigen/src/SparseExtra/SparseLU.h index 3d10dbbee..ffcdb88e2 100644 --- a/unsupported/Eigen/src/SparseExtra/SparseLU.h +++ b/unsupported/Eigen/src/SparseExtra/SparseLU.h @@ -31,7 +31,8 @@ enum { SvAdjoint = 2 }; -/** \ingroup Sparse_Module +/** \deprecated use class BiCGSTAB, class SuperLU, or class UmfPackLU + * \ingroup Sparse_Module * * \class SparseLU * @@ -56,16 +57,18 @@ class SparseLU public: typedef _MatrixType MatrixType; - /** Creates a dummy LU factorization object with flags \a flags. */ - SparseLU(int flags = 0) + /** \deprecated the entire class is deprecated + * Creates a dummy LU factorization object with flags \a flags. */ + EIGEN_DEPRECATED SparseLU(int flags = 0) : m_flags(flags), m_status(0) { m_precision = RealScalar(0.1) * Eigen::NumTraits<RealScalar>::dummy_precision(); } - /** Creates a LU object and compute the respective factorization of \a matrix using + /** \deprecated the entire class is deprecated + * Creates a LU object and compute the respective factorization of \a matrix using * flags \a flags. */ - SparseLU(const _MatrixType& matrix, int flags = 0) + EIGEN_DEPRECATED SparseLU(const _MatrixType& matrix, int flags = 0) : /*m_matrix(matrix.rows(), matrix.cols()),*/ m_flags(flags), m_status(0) { m_precision = RealScalar(0.1) * Eigen::NumTraits<RealScalar>::dummy_precision(); diff --git a/unsupported/Eigen/src/SparseExtra/SuperLUSupportLegacy.h b/unsupported/Eigen/src/SparseExtra/SuperLUSupportLegacy.h index e01aba4e6..e85d8d36e 100644 --- a/unsupported/Eigen/src/SparseExtra/SuperLUSupportLegacy.h +++ b/unsupported/Eigen/src/SparseExtra/SuperLUSupportLegacy.h @@ -25,6 +25,7 @@ #ifndef EIGEN_SUPERLUSUPPORT_LEGACY_H #define EIGEN_SUPERLUSUPPORT_LEGACY_H +/** \deprecated use class BiCGSTAB, class SuperLU, or class UmfPackLU */ template<typename MatrixType> class SparseLU<MatrixType,SuperLULegacy> : public SparseLU<MatrixType> { @@ -42,12 +43,14 @@ class SparseLU<MatrixType,SuperLULegacy> : public SparseLU<MatrixType> public: - SparseLU(int flags = NaturalOrdering) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLU(int flags = NaturalOrdering) : Base(flags) { } - SparseLU(const MatrixType& matrix, int flags = NaturalOrdering) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLU(const MatrixType& matrix, int flags = NaturalOrdering) : Base(flags) { compute(matrix); diff --git a/unsupported/Eigen/src/SparseExtra/UmfPackSupportLegacy.h b/unsupported/Eigen/src/SparseExtra/UmfPackSupportLegacy.h index fa01bb338..3d30e1ed1 100644 --- a/unsupported/Eigen/src/SparseExtra/UmfPackSupportLegacy.h +++ b/unsupported/Eigen/src/SparseExtra/UmfPackSupportLegacy.h @@ -25,7 +25,7 @@ #ifndef EIGEN_UMFPACKSUPPORT_LEGACY_H #define EIGEN_UMFPACKSUPPORT_LEGACY_H - +/** \deprecated use class BiCGSTAB, class SuperLU, or class UmfPackLU */ template<typename _MatrixType> class SparseLU<_MatrixType,UmfPack> : public SparseLU<_MatrixType> { @@ -45,12 +45,14 @@ class SparseLU<_MatrixType,UmfPack> : public SparseLU<_MatrixType> typedef _MatrixType MatrixType; typedef typename MatrixType::Index Index; - SparseLU(int flags = NaturalOrdering) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLU(int flags = NaturalOrdering) : Base(flags), m_numeric(0) { } - SparseLU(const MatrixType& matrix, int flags = NaturalOrdering) + /** \deprecated the entire class is deprecated */ + EIGEN_DEPRECATED SparseLU(const MatrixType& matrix, int flags = NaturalOrdering) : Base(flags), m_numeric(0) { compute(matrix); |