Lines Matching refs:cwise
79 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2());
80 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square());
81 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube());
83 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1));
84 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1));
85 m3 = m1; m3.cwise() += 1;
87 m3 = m1; m3.cwise() -= 1;
90 VERIFY_IS_APPROX(m2, m2.cwise() * mones);
91 VERIFY_IS_APPROX(m1.cwise() * m2, m2.cwise() * m1);
93 m3.cwise() *= m2;
94 VERIFY_IS_APPROX(m3, m1.cwise() * m2);
96 VERIFY_IS_APPROX(mones, m2.cwise()/m2);
99 VERIFY_IS_APPROX(m1.cwise() / m2, m1.cwise() * (m2.cwise().inverse()));
100 m3 = m1.cwise().abs().cwise().sqrt();
101 VERIFY_IS_APPROX(m3.cwise().square(), m1.cwise().abs());
102 VERIFY_IS_APPROX(m1.cwise().square().cwise().sqrt(), m1.cwise().abs());
103 VERIFY_IS_APPROX(m1.cwise().abs().cwise().log().cwise().exp() , m1.cwise().abs());
105 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square());
106 m3 = (m1.cwise().abs().cwise()<=RealScalar(0.01)).select(mones,m1);
107 VERIFY_IS_APPROX(m3.cwise().pow(-1), m3.cwise().inverse());
108 m3 = m1.cwise().abs();
109 VERIFY_IS_APPROX(m3.cwise().pow(RealScalar(0.5)), m3.cwise().sqrt());
111 // VERIFY_IS_APPROX(m1.cwise().tan(), m1.cwise().sin().cwise() / m1.cwise().cos());
112 VERIFY_IS_APPROX(mones, m1.cwise().sin().cwise().square() + m1.cwise().cos().cwise().square());
114 m3.cwise() /= m2;
115 VERIFY_IS_APPROX(m3, m1.cwise() / m2);
119 VERIFY_IS_APPROX( m1.cwise().min(m2), m2.cwise().min(m1) );
120 VERIFY_IS_APPROX( m1.cwise().min(m1+mones), m1 );
121 VERIFY_IS_APPROX( m1.cwise().min(m1-mones), m1-mones );
124 VERIFY_IS_APPROX( m1.cwise().max(m2), m2.cwise().max(m1) );
125 VERIFY_IS_APPROX( m1.cwise().max(m1-mones), m1 );
126 VERIFY_IS_APPROX( m1.cwise().max(m1+mones), m1+mones );
128 VERIFY( (m1.cwise() == m1).all() );
129 VERIFY( (m1.cwise() != m2).any() );
130 VERIFY(!(m1.cwise() == (m1+mones)).any() );
135 VERIFY( (m1.cwise() == m3).any() );
136 VERIFY( !(m1.cwise() == m3).all() );
138 VERIFY( (m1.cwise().min(m2).cwise() <= m2).all() );
139 VERIFY( (m1.cwise().max(m2).cwise() >= m2).all() );
140 VERIFY( (m1.cwise().min(m2).cwise() < (m1+mones)).all() );
141 VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() );
143 VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
144 VERIFY( !(m1.cwise()<m1.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
145 VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );