Lines Matching refs:m1

35 cwiseops_real_only(MatrixType& m1, MatrixType& m2, MatrixType& m3, MatrixType& mones)  in cwiseops_real_only()  argument
40 VERIFY_IS_APPROX(m1.cwise() / m2, m1.cwise() * (m2.cwise().inverse())); in cwiseops_real_only()
41 m3 = m1.cwise().abs().cwise().sqrt(); in cwiseops_real_only()
42 VERIFY_IS_APPROX(m3.cwise().square(), m1.cwise().abs()); in cwiseops_real_only()
43 VERIFY_IS_APPROX(m1.cwise().square().cwise().sqrt(), m1.cwise().abs()); in cwiseops_real_only()
44 VERIFY_IS_APPROX(m1.cwise().abs().cwise().log().cwise().exp() , m1.cwise().abs()); in cwiseops_real_only()
46 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops_real_only()
47 m3 = (m1.cwise().abs().cwise()<=RealScalar(0.01)).select(mones,m1); in cwiseops_real_only()
49 m3 = m1.cwise().abs(); in cwiseops_real_only()
53 VERIFY_IS_APPROX(mones, m1.cwise().sin().cwise().square() + m1.cwise().cos().cwise().square()); in cwiseops_real_only()
54 m3 = m1; in cwiseops_real_only()
56 VERIFY_IS_APPROX(m3, m1.cwise() / m2); in cwiseops_real_only()
77 MatrixType m1 = MatrixType::Random(rows, cols), in cwiseops() local
78 m1bis = m1, in cwiseops()
123 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2()); in cwiseops()
124 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops()
125 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube()); in cwiseops()
127 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1)); in cwiseops()
128 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1)); in cwiseops()
129 m3 = m1; m3.cwise() += 1; in cwiseops()
130 VERIFY_IS_APPROX(m1 + mones, m3); in cwiseops()
131 m3 = m1; m3.cwise() -= 1; in cwiseops()
132 VERIFY_IS_APPROX(m1 - mones, m3); in cwiseops()
135 VERIFY_IS_APPROX(m1.cwise() * m2, m2.cwise() * m1); in cwiseops()
136 m3 = m1; in cwiseops()
138 VERIFY_IS_APPROX(m3, m1.cwise() * m2); in cwiseops()
143 VERIFY_IS_APPROX( m1.cwise().min(m2), m2.cwise().min(m1) ); in cwiseops()
144 VERIFY_IS_APPROX( m1.cwise().min(m1+mones), m1 ); in cwiseops()
145 VERIFY_IS_APPROX( m1.cwise().min(m1-mones), m1-mones ); in cwiseops()
148 VERIFY_IS_APPROX( m1.cwise().max(m2), m2.cwise().max(m1) ); in cwiseops()
149 VERIFY_IS_APPROX( m1.cwise().max(m1-mones), m1 ); in cwiseops()
150 VERIFY_IS_APPROX( m1.cwise().max(m1+mones), m1+mones ); in cwiseops()
152 VERIFY( (m1.cwise() == m1).all() ); in cwiseops()
153 VERIFY( (m1.cwise() != m2).any() ); in cwiseops()
154 VERIFY(!(m1.cwise() == (m1+mones)).any() ); in cwiseops()
157 m3 = m1; in cwiseops()
159 VERIFY( (m1.cwise() == m3).any() ); in cwiseops()
160 VERIFY( !(m1.cwise() == m3).all() ); in cwiseops()
162 VERIFY( (m1.cwise().min(m2).cwise() <= m2).all() ); in cwiseops()
163 VERIFY( (m1.cwise().max(m2).cwise() >= m2).all() ); in cwiseops()
164 VERIFY( (m1.cwise().min(m2).cwise() < (m1+mones)).all() ); in cwiseops()
165 VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() ); in cwiseops()
167 VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() ); in cwiseops()
168 VERIFY( !(m1.cwise()<m1bis.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() ); in cwiseops()
169 VERIFY( !(m1.cwise()>m1bis.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() ); in cwiseops()
171 cwiseops_real_only(m1, m2, m3, mones); in cwiseops()