mark deprecated sparse solvers as so.

This commit is contained in:
Gael Guennebaud 2011-10-24 09:51:02 +02:00
parent 39d4585bff
commit a997dacc67
9 changed files with 47 additions and 24 deletions

View File

@ -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);

View File

@ -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);

View File

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

View File

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

View File

@ -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);

View File

@ -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);

View File

@ -22,6 +22,8 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
#define EIGEN_NO_DEPRECATED_WARNING
#include "sparse.h"
#include <Eigen/SparseExtra>

View File

@ -22,6 +22,8 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
#define EIGEN_NO_DEPRECATED_WARNING
#include "sparse.h"
#include <Eigen/SparseExtra>

View File

@ -22,6 +22,8 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
#define EIGEN_NO_DEPRECATED_WARNING
#include "sparse.h"
#include <Eigen/SparseExtra>