Lines Matching refs:m2
169 SparseMatrixType m2(rows,cols); in sparse_basic() local
170 m2.startFill(); in sparse_basic()
177 m2.fillrand(i,j) = m1(i,j) = ei_random<Scalar>(); in sparse_basic()
180 m2.endFill(); in sparse_basic()
181 VERIFY_IS_APPROX(m2,m1); in sparse_basic()
207 SparseMatrixType m2(rows, rows); in sparse_basic() local
211 initSparse<Scalar>(density, refM2, m2); in sparse_basic()
215 VERIFY_IS_APPROX(m1+m2, refM1+refM2); in sparse_basic()
216 VERIFY_IS_APPROX(m1+m2+m3, refM1+refM2+refM3); in sparse_basic()
217 VERIFY_IS_APPROX(m3.cwise()*(m1+m2), refM3.cwise()*(refM1+refM2)); in sparse_basic()
218 VERIFY_IS_APPROX(m1*s1-m2, refM1*s1-refM2); in sparse_basic()
223 VERIFY_IS_APPROX(m1+=m2, refM1+=refM2); in sparse_basic()
224 VERIFY_IS_APPROX(m1-=m2, refM1-=refM2); in sparse_basic()
237 SparseMatrixType m2(rows, rows); in sparse_basic() local
238 initSparse<Scalar>(density, refMat2, m2); in sparse_basic()
241 VERIFY_IS_APPROX(m2.innerVector(j0), refMat2.col(j0)); in sparse_basic()
242 VERIFY_IS_APPROX(m2.innerVector(j0)+m2.innerVector(j1), refMat2.col(j0)+refMat2.col(j1)); in sparse_basic()
251 SparseMatrixType m2(rows, rows); in sparse_basic() local
252 initSparse<Scalar>(density, refMat2, m2); in sparse_basic()
256 VERIFY_IS_APPROX(m2.innerVectors(j0,n0), refMat2.block(0,j0,rows,n0)); in sparse_basic()
257 VERIFY_IS_APPROX(m2.innerVectors(j0,n0)+m2.innerVectors(j1,n0), in sparse_basic()
266 SparseMatrixType m2(rows, rows); in sparse_basic() local
267 initSparse<Scalar>(density, refMat2, m2); in sparse_basic()
268 VERIFY_IS_APPROX(m2.transpose().eval(), refMat2.transpose().eval()); in sparse_basic()
269 VERIFY_IS_APPROX(m2.transpose(), refMat2.transpose()); in sparse_basic()
274 SparseMatrixType m2(rows, rows); in sparse_basic() local
279 m2.startFill(); in sparse_basic()
280 for (int j=0; j<m2.outerSize(); ++j) in sparse_basic()
281 for (int i=0; i<m2.innerSize(); ++i) in sparse_basic()
291 m2.fill(i,j) = Scalar(0); in sparse_basic()
296 m2.fill(i,j) = refM2(i,j) = Scalar(1); in sparse_basic()
299 m2.endFill(); in sparse_basic()
300 VERIFY(countFalseNonZero+countTrueNonZero == m2.nonZeros()); in sparse_basic()
301 VERIFY_IS_APPROX(m2, refM2); in sparse_basic()
302 m2.prune(1); in sparse_basic()
303 VERIFY(countTrueNonZero==m2.nonZeros()); in sparse_basic()
304 VERIFY_IS_APPROX(m2, refM2); in sparse_basic()