Lines Matching full:cols
21 Index cols = m.cols();
23 MatrixType m1 = MatrixType::Random(rows, cols),
24 m2 = MatrixType::Random(rows, cols),
25 m3(rows, cols);
28 RowVectorType rv1 = RowVectorType::Random(cols);
35 VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1);
36 VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,s2) );
62 VERIFY_IS_APPROX(m1.block(0,0,0,cols).colwise().sum(), RowVectorType::Zero(cols));
82 Index cols = m.cols();
85 c = internal::random<Index>(0, cols-1);
87 MatrixType m1 = MatrixType::Random(rows, cols),
88 m2 = MatrixType::Random(rows, cols),
89 m3(rows, cols);
93 if (rows*cols>1)
111 for (int j=0; j<cols; ++j)
114 VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array())
115 .select(MatrixType::Zero(rows,cols),m1), m3);
117 VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array())
119 VERIFY_IS_APPROX( (m1.array().abs()>=MatrixType::Constant(rows,cols,mid).array())
125 VERIFY(((m1.array().abs()+1)>RealScalar(0.1)).count() == rows*cols);
130 VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().colwise().count(), VectorOfIndices::Constant(cols,rows).transpose());
131 VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().rowwise().count(), VectorOfIndices::Constant(rows, cols));
150 Index cols = m.cols();
152 MatrixType m1 = MatrixType::Random(rows, cols);
158 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin(MatrixType::Constant(rows,cols, minM1)));
159 VERIFY_IS_APPROX(m1, m1.cwiseMin(MatrixType::Constant(rows,cols, maxM1)));
161 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax(MatrixType::Constant(rows,cols, maxM1)));
162 VERIFY_IS_APPROX(m1, m1.cwiseMax(MatrixType::Constant(rows,cols, minM1)));
165 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin( minM1));
168 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax( maxM1));