third pass of const-correctness fixes (bug #54), hopefully the last one...

This commit is contained in:
Benoit Jacob
2011-01-07 05:16:01 -05:00
parent c7baf07a3e
commit 98f0274305
7 changed files with 82 additions and 19 deletions

View File

@@ -118,10 +118,11 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
// typedef SparseCwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType;
/** \internal the return type of MatrixBase::adjoint() */
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<Derived> >,
Transpose<Derived>
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<const Derived> >,
Transpose<const Derived>
>::type AdjointReturnType;
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject;
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase
@@ -424,7 +425,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
// void normalize();
Transpose<Derived> transpose() { return derived(); }
const Transpose<Derived> transpose() const { return derived(); }
const Transpose<const Derived> transpose() const { return derived(); }
// void transposeInPlace();
const AdjointReturnType adjoint() const { return transpose(); }