diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-06-10 00:06:40 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-06-10 00:06:40 +0200 |
commit | e3929485486ad4450dd93d24fa2af9dd72aa368e (patch) | |
tree | 05e90fdb21d813e4d45b34dca7aad7ac4f06e9b2 /test/sparse_vector.cpp | |
parent | 4811b4526c93f4f28c57a085ee02b0eba0806afa (diff) |
Fix bug #607: handle implicit transposition from sparse vector to dense vector
Diffstat (limited to 'test/sparse_vector.cpp')
-rw-r--r-- | test/sparse_vector.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp index d16d42f59..ec5877b6a 100644 --- a/test/sparse_vector.cpp +++ b/test/sparse_vector.cpp @@ -90,6 +90,11 @@ template<typename Scalar> void sparse_vector(int rows, int cols) VERIFY_IS_APPROX((mv1=v1),v1); VERIFY_IS_APPROX(mv1,(v1=mv1)); VERIFY_IS_APPROX(mv1,(v1=mv1.transpose())); + + // check copy to dense vector with transpose + refV3.resize(0); + VERIFY_IS_APPROX(refV3 = v1.transpose(),v1.toDense()); + VERIFY_IS_APPROX(DenseVector(v1),v1.toDense()); } |