mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user