From e7c48fac9b0fed8bf262e44feccb63671362c845 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 23 Jan 2009 13:59:32 +0000 Subject: sparse module: makes -= and += operator working Question 1: why are *=scalar and /=scalar working right away ? Same weirdness in DynamicSparseMatrix where operators += and -= work wihout having to redefine them ??? --- test/sparse_vector.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/sparse_vector.cpp') diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp index 64f52cbe9..8207e522a 100644 --- a/test/sparse_vector.cpp +++ b/test/sparse_vector.cpp @@ -79,6 +79,9 @@ template void sparse_vector(int rows, int cols) VERIFY_IS_APPROX(v1*=s1, refV1*=s1); VERIFY_IS_APPROX(v1/=s1, refV1/=s1); + + VERIFY_IS_APPROX(v1+=v2, refV1+=refV2); + VERIFY_IS_APPROX(v1-=v2, refV1-=refV2); VERIFY_IS_APPROX(v1.dot(v2), refV1.dot(refV2)); -- cgit v1.2.3