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