Lines Matching refs:m1
31 MatrixType m1 = MatrixType::Random(rows, cols), in cwiseops() local
79 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2()); in cwiseops()
80 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops()
81 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube()); in cwiseops()
83 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1)); in cwiseops()
84 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1)); in cwiseops()
85 m3 = m1; m3.cwise() += 1; in cwiseops()
86 VERIFY_IS_APPROX(m1 + mones, m3); in cwiseops()
87 m3 = m1; m3.cwise() -= 1; in cwiseops()
88 VERIFY_IS_APPROX(m1 - mones, m3); in cwiseops()
91 VERIFY_IS_APPROX(m1.cwise() * m2, m2.cwise() * m1); in cwiseops()
92 m3 = m1; in cwiseops()
94 VERIFY_IS_APPROX(m3, m1.cwise() * m2); in cwiseops()
99 VERIFY_IS_APPROX(m1.cwise() / m2, m1.cwise() * (m2.cwise().inverse())); in cwiseops()
100 m3 = m1.cwise().abs().cwise().sqrt(); in cwiseops()
101 VERIFY_IS_APPROX(m3.cwise().square(), m1.cwise().abs()); in cwiseops()
102 VERIFY_IS_APPROX(m1.cwise().square().cwise().sqrt(), m1.cwise().abs()); in cwiseops()
103 VERIFY_IS_APPROX(m1.cwise().abs().cwise().log().cwise().exp() , m1.cwise().abs()); in cwiseops()
105 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops()
106 m3 = (m1.cwise().abs().cwise()<=RealScalar(0.01)).select(mones,m1); in cwiseops()
108 m3 = m1.cwise().abs(); in cwiseops()
112 VERIFY_IS_APPROX(mones, m1.cwise().sin().cwise().square() + m1.cwise().cos().cwise().square()); in cwiseops()
113 m3 = m1; in cwiseops()
115 VERIFY_IS_APPROX(m3, m1.cwise() / m2); in cwiseops()
119 VERIFY_IS_APPROX( m1.cwise().min(m2), m2.cwise().min(m1) ); in cwiseops()
120 VERIFY_IS_APPROX( m1.cwise().min(m1+mones), m1 ); in cwiseops()
121 VERIFY_IS_APPROX( m1.cwise().min(m1-mones), m1-mones ); in cwiseops()
124 VERIFY_IS_APPROX( m1.cwise().max(m2), m2.cwise().max(m1) ); in cwiseops()
125 VERIFY_IS_APPROX( m1.cwise().max(m1-mones), m1 ); in cwiseops()
126 VERIFY_IS_APPROX( m1.cwise().max(m1+mones), m1+mones ); in cwiseops()
128 VERIFY( (m1.cwise() == m1).all() ); in cwiseops()
129 VERIFY( (m1.cwise() != m2).any() ); in cwiseops()
130 VERIFY(!(m1.cwise() == (m1+mones)).any() ); in cwiseops()
133 m3 = m1; in cwiseops()
135 VERIFY( (m1.cwise() == m3).any() ); in cwiseops()
136 VERIFY( !(m1.cwise() == m3).all() ); in cwiseops()
138 VERIFY( (m1.cwise().min(m2).cwise() <= m2).all() ); in cwiseops()
139 VERIFY( (m1.cwise().max(m2).cwise() >= m2).all() ); in cwiseops()
140 VERIFY( (m1.cwise().min(m2).cwise() < (m1+mones)).all() ); in cwiseops()
141 VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() ); in cwiseops()
143 VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() ); in cwiseops()
144 VERIFY( !(m1.cwise()<m1.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() ); in cwiseops()
145 VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() ); in cwiseops()