diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-03-06 11:58:22 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-03-06 11:58:22 +0100 |
commit | 98ce4455ddad01ef028b65f96e232d4b750647f0 (patch) | |
tree | 248f3d88d1e65f8fe2cdbb18215f05982764560b /test/sparse_vector.cpp | |
parent | 69bd334d2be5890cd7a8b5f4d7e62f5db1b02b18 (diff) |
fix sparse vector assignment from a sparse matrix
Diffstat (limited to 'test/sparse_vector.cpp')
-rw-r--r-- | test/sparse_vector.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp index 7973a47dc..d16d42f59 100644 --- a/test/sparse_vector.cpp +++ b/test/sparse_vector.cpp @@ -84,6 +84,12 @@ template<typename Scalar> void sparse_vector(int rows, int cols) VERIFY_IS_APPROX((v1 = -v1), (refV1 = -refV1)); VERIFY_IS_APPROX((v1 = v1.transpose()), (refV1 = refV1.transpose().eval())); VERIFY_IS_APPROX((v1 += -v1), (refV1 += -refV1)); + + // sparse matrix to sparse vector + SparseMatrixType mv1; + VERIFY_IS_APPROX((mv1=v1),v1); + VERIFY_IS_APPROX(mv1,(v1=mv1)); + VERIFY_IS_APPROX(mv1,(v1=mv1.transpose())); } |