Lines Matching refs:cwise
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()
38 m3.cwise() += s2; in array()
39 VERIFY_IS_APPROX(m3, m1.cwise() + s2); in array()
41 m3.cwise() -= s1; in array()
42 VERIFY_IS_APPROX(m3, m1.cwise() - s1); in array()
68 VERIFY(((m1.cwise() + Scalar(1)).cwise() > m1).all()); in comparisons()
69 VERIFY(((m1.cwise() - Scalar(1)).cwise() < m1).all()); 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()
91 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid)) in comparisons()
94 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()<MatrixType::Constant(rows,cols,mid)) in comparisons()
96 VERIFY_IS_APPROX( (m1.cwise().abs().cwise()>=MatrixType::Constant(rows,cols,mid)) 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()
111 VERIFY_IS_APPROX(u.template lpNorm<Infinity>(), u.cwise().abs().maxCoeff()); in lpNorm()
112 VERIFY_IS_APPROX(u.template lpNorm<1>(), u.cwise().abs().sum()); in lpNorm()
113 VERIFY_IS_APPROX(u.template lpNorm<2>(), ei_sqrt(u.cwise().abs().cwise().square().sum())); in lpNorm()
114 …pow(u.template lpNorm<5>(), typename VectorType::RealScalar(5)), u.cwise().abs().cwise().pow(5).su… in lpNorm()