bug #482: pass scalar by const ref - pass on the sparse module

(also fix a compilation issue due to previous pass)
This commit is contained in:
Gael Guennebaud
2012-06-28 21:01:02 +02:00
parent 23184527fa
commit 9629ba361a
10 changed files with 31 additions and 32 deletions

View File

@@ -445,12 +445,12 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
template<typename OtherDerived>
bool isApprox(const SparseMatrixBase<OtherDerived>& other,
RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const
{ return toDense().isApprox(other.toDense(),prec); }
template<typename OtherDerived>
bool isApprox(const MatrixBase<OtherDerived>& other,
RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const
{ return toDense().isApprox(other,prec); }
/** \returns the matrix or vector obtained by evaluating this expression.