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

@@ -114,13 +114,13 @@ class SparseSparseProduct : internal::no_assignment_operator,
}
template<typename Lhs, typename Rhs>
EIGEN_STRONG_INLINE SparseSparseProduct(const Lhs& lhs, const Rhs& rhs, RealScalar tolerance)
EIGEN_STRONG_INLINE SparseSparseProduct(const Lhs& lhs, const Rhs& rhs, const RealScalar& tolerance)
: m_lhs(lhs), m_rhs(rhs), m_tolerance(tolerance), m_conservative(false)
{
init();
}
SparseSparseProduct pruned(Scalar reference = 0, RealScalar epsilon = NumTraits<RealScalar>::dummy_precision()) const
SparseSparseProduct pruned(const Scalar& reference = 0, const RealScalar& epsilon = NumTraits<RealScalar>::dummy_precision()) const
{
return SparseSparseProduct(m_lhs,m_rhs,internal::abs(reference)*epsilon);
}