Lines Matching full:cols
24 int cols = m.cols();
26 MatrixType m1 = MatrixType::Random(rows, cols),
27 m2 = MatrixType::Random(rows, cols),
28 m3(rows, cols);
35 VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1);
36 VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) );
59 int cols = m.cols();
62 c = ei_random<int>(0, cols-1);
64 MatrixType m1 = MatrixType::Random(rows, cols),
65 m2 = MatrixType::Random(rows, cols),
66 m3(rows, cols);
70 if (rows*cols>1)
88 for (int j=0; j<cols; ++j)
91 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid))
92 .select(MatrixType::Zero(rows,cols),m1), m3);
94 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid))
96 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()>=MatrixType::Constant(rows,cols,mid))
102 VERIFY(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).count() == rows*cols);
103 VERIFY_IS_APPROX(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).colwise().count().template cast<int>(), RowVectorXi::Constant(cols,rows));
104 VERIFY_IS_APPROX(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).rowwise().count().template cast<int>(), VectorXi::Constant(rows, cols));