Lines Matching refs:m2
15 static void run(SparseMatrixType& m2, SparseMatrixType& m4, DenseMatrix& refMat2, DenseMatrix& refMat4) {
16 int c = internal::random(0,m2.cols()-1);
17 int c1 = internal::random(0,m2.cols()-1);
18 VERIFY_IS_APPROX(m4=m2.col(c)*refMat2.col(c1).transpose(), refMat4=refMat2.col(c)*refMat2.col(c1).transpose());
19 VERIFY_IS_APPROX(m4=refMat2.col(c1)*m2.col(c).transpose(), refMat4=refMat2.col(c1)*refMat2.col(c).transpose());
24 static void run(SparseMatrixType& m2, SparseMatrixType& m4, DenseMatrix& refMat2, DenseMatrix& refMat4) {
25 int r = internal::random(0,m2.rows()-1);
26 int c1 = internal::random(0,m2.cols()-1);
27 VERIFY_IS_APPROX(m4=m2.row(r).transpose()*refMat2.col(c1).transpose(), refMat4=refMat2.row(r).transpose()*refMat2.col(c1).transpose());
28 VERIFY_IS_APPROX(m4=refMat2.col(c1)*m2.row(r), refMat4=refMat2.col(c1)*refMat2.row(r));
32 // (m2,m4,refMat2,refMat4,dv1);
33 // VERIFY_IS_APPROX(m4=m2.innerVector(c)*dv1.transpose(), refMat4=refMat2.colVector(c)*dv1.transpose());
65 SparseMatrixType m2 (rows, depth);
72 initSparse(density, refMat2, m2);
83 VERIFY_IS_APPROX(m4=m2*m3, refMat4=refMat2*refMat3);
86 VERIFY_IS_APPROX(m4=m2*m3t.transpose(), refMat4=refMat2*refMat3t.transpose());
88 VERIFY_IS_APPROX(m4 = m2*m3/s1, refMat4 = refMat2*refMat3/s1);
89 VERIFY_IS_APPROX(m4 = m2*m3*s1, refMat4 = refMat2*refMat3*s1);
90 VERIFY_IS_APPROX(m4 = s2*m2*m3*s1, refMat4 = s2*refMat2*refMat3*s1);
92 VERIFY_IS_APPROX(m4=(m2*m3).pruned(0), refMat4=refMat2*refMat3);
95 VERIFY_IS_APPROX(m4=(m2*m3t.transpose()).pruned(0), refMat4=refMat2*refMat3t.transpose());
98 m4 = m2; refMat4 = refMat2;
102 VERIFY_IS_APPROX(dm4=m2*refMat3, refMat4=refMat2*refMat3);
103 VERIFY_IS_APPROX(dm4=m2*refMat3t.transpose(), refMat4=refMat2*refMat3t.transpose());
107 VERIFY_IS_APPROX(dm4=m2*(refMat3+refMat3), refMat4=refMat2*(refMat3+refMat3));
117 test_outer<SparseMatrixType,DenseMatrix>::run(m2,m4,refMat2,refMat4);
127 SparseMatrixType m2(rows, rows);
129 initSparse<Scalar>(density, refM2, m2);
131 VERIFY_IS_APPROX(m3=m2*d1, refM3=refM2*d1);
132 VERIFY_IS_APPROX(m3=m2.transpose()*d1, refM3=refM2.transpose()*d1);
133 VERIFY_IS_APPROX(m3=d1*m2, refM3=d1*refM2);
134 VERIFY_IS_APPROX(m3=d1*m2.transpose(), refM3=d1 * refM2.transpose());
178 DenseMatrixType m2(2,2);
180 m2.setZero();
182 DenseMatrixType m3 = sm1*m2;
190 DenseMatrixType m4(sm2*m2);