Lines Matching full:m1

26   MatrixType m1 = MatrixType::Random(rows, cols),  in array()  local
34 VERIFY_IS_APPROX(m1.cwise() + s1, s1 + m1.cwise()); in array()
35 VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1); in array()
36 VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) ); in array()
37 m3 = m1; in array()
39 VERIFY_IS_APPROX(m3, m1.cwise() + s2); in array()
40 m3 = m1; in array()
42 VERIFY_IS_APPROX(m3, m1.cwise() - s1); in array()
45 VERIFY_IS_APPROX(m1.colwise().sum().sum(), m1.sum()); in array()
46 VERIFY_IS_APPROX(m1.rowwise().sum().sum(), m1.sum()); in array()
47 if (!ei_isApprox(m1.sum(), (m1+m2).sum())) in array()
48 VERIFY_IS_NOT_APPROX(((m1+m2).rowwise().sum()).sum(), m1.sum()); in array()
49 VERIFY_IS_APPROX(m1.colwise().sum(), m1.colwise().redux(internal::scalar_sum_op<Scalar>())); in array()
64 MatrixType m1 = MatrixType::Random(rows, cols), in comparisons() local
68 VERIFY(((m1.cwise() + Scalar(1)).cwise() > m1).all()); in comparisons()
69 VERIFY(((m1.cwise() - Scalar(1)).cwise() < m1).all()); in comparisons()
72 m3 = m1; in comparisons()
74 VERIFY(! (m1.cwise() < m3).all() ); in comparisons()
75 VERIFY(! (m1.cwise() > m3).all() ); in comparisons()
79 VERIFY( (m1.cwise() != (m1(r,c)+1) ).any() ); in comparisons()
80 VERIFY( (m1.cwise() > (m1(r,c)-1) ).any() ); in comparisons()
81 VERIFY( (m1.cwise() < (m1(r,c)+1) ).any() ); in comparisons()
82 VERIFY( (m1.cwise() == m1(r,c) ).any() ); in comparisons()
85 VERIFY_IS_APPROX( (m1.cwise()<m2).select(m1,m2), m1.cwise().min(m2) ); in comparisons()
86 VERIFY_IS_APPROX( (m1.cwise()>m2).select(m1,m2), m1.cwise().max(m2) ); in comparisons()
87 Scalar mid = (m1.cwise().abs().minCoeff() + m1.cwise().abs().maxCoeff())/Scalar(2); in comparisons()
90 m3(i,j) = ei_abs(m1(i,j))<mid ? 0 : m1(i,j); in comparisons()
91 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid)) in comparisons()
92 .select(MatrixType::Zero(rows,cols),m1), m3); in comparisons()
94 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid)) in comparisons()
95 .select(0,m1), m3); in comparisons()
96 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()>=MatrixType::Constant(rows,cols,mid)) in comparisons()
97 .select(m1,0), m3); in comparisons()
99 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<mid).select(0,m1), m3); in comparisons()
102 VERIFY(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).count() == rows*cols); in comparisons()
103 …VERIFY_IS_APPROX(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).colwise().count().template… in comparisons()
104 …VERIFY_IS_APPROX(((m1.cwise().abs().cwise()+1).cwise()>RealScalar(0.1)).rowwise().count().template… in comparisons()