Lines Matching full:cols
20 Index cols = m.cols(); in array_for_matrix() local
22 MatrixType m1 = MatrixType::Random(rows, cols), in array_for_matrix()
23 m2 = MatrixType::Random(rows, cols), in array_for_matrix()
24 m3(rows, cols); in array_for_matrix()
27 RowVectorType rv1 = RowVectorType::Random(cols); in array_for_matrix()
34 VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1); in array_for_matrix()
35 …VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,… in array_for_matrix()
61 VERIFY_IS_APPROX(m1.block(0,0,0,cols).colwise().sum(), RowVectorType::Zero(cols)); in array_for_matrix()
81 Index cols = m.cols(); in comparisons() local
84 c = internal::random<Index>(0, cols-1); in comparisons()
86 MatrixType m1 = MatrixType::Random(rows, cols), in comparisons()
87 m2 = MatrixType::Random(rows, cols), in comparisons()
88 m3(rows, cols); in comparisons()
92 if (rows*cols>1) in comparisons()
111 for (int j=0; j<cols; ++j) in comparisons()
114 VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array()) in comparisons()
115 .select(MatrixType::Zero(rows,cols),m1), m3); in comparisons()
117 VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array()) in comparisons()
119 VERIFY_IS_APPROX( (m1.array().abs()>=MatrixType::Constant(rows,cols,mid).array()) in comparisons()
125 VERIFY(((m1.array().abs()+1)>RealScalar(0.1)).count() == rows*cols); in comparisons()
130 …+1)>RealScalar(0.1)).matrix().colwise().count(), VectorOfIndices::Constant(cols,rows).transpose()); in comparisons()
131 …ray().abs()+1)>RealScalar(0.1)).matrix().rowwise().count(), VectorOfIndices::Constant(rows, cols)); in comparisons()
151 Index cols = m.cols(); in cwise_min_max() local
153 MatrixType m1 = MatrixType::Random(rows, cols); in cwise_min_max()
159 …VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin(MatrixType::Constant(rows,col… in cwise_min_max()
160 VERIFY_IS_APPROX(m1, m1.cwiseMin(MatrixType::Constant(rows,cols, maxM1))); in cwise_min_max()
162 …VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax(MatrixType::Constant(rows,col… in cwise_min_max()
163 VERIFY_IS_APPROX(m1, m1.cwiseMax(MatrixType::Constant(rows,cols, minM1))); in cwise_min_max()
166 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin( minM1)); in cwise_min_max()
171 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax( maxM1)); in cwise_min_max()
176 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1).array(), (m1.array().min)( minM1)); in cwise_min_max()
179 VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1).array(), (m1.array().max)( maxM1)); in cwise_min_max()
193 Index rows = t.rows(), cols = t.cols(); in resize() local
195 MatrixType m(rows,cols); in resize()
197 Array2DType a2(rows,cols); in resize()
200 m.array().resize(rows+1,cols+1); in resize()
201 VERIFY(m.rows()==rows+1 && m.cols()==cols+1); in resize()
202 a2.matrix().resize(rows+1,cols+1); in resize()
203 VERIFY(a2.rows()==rows+1 && a2.cols()==cols+1); in resize()
204 v.array().resize(cols); in resize()
205 VERIFY(v.size()==cols); in resize()
206 a1.matrix().resize(cols); in resize()
207 VERIFY(a1.size()==cols); in resize()