Lines Matching full:m2
29 m2(rows, cols), in vectorwiseop_array() local
37 m2 = m1; in vectorwiseop_array()
38 m2.colwise() += colvec; in vectorwiseop_array()
39 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_array()
40 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_array()
42 VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose()); in vectorwiseop_array()
45 m2 = m1; in vectorwiseop_array()
46 m2.rowwise() += rowvec; in vectorwiseop_array()
47 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_array()
48 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_array()
50 VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose()); in vectorwiseop_array()
55 m2 = m1; in vectorwiseop_array()
56 m2.colwise() -= colvec; in vectorwiseop_array()
57 VERIFY_IS_APPROX(m2, m1.colwise() - colvec); in vectorwiseop_array()
58 VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec); in vectorwiseop_array()
60 VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose()); in vectorwiseop_array()
63 m2 = m1; in vectorwiseop_array()
64 m2.rowwise() -= rowvec; in vectorwiseop_array()
65 VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec); in vectorwiseop_array()
66 VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec); in vectorwiseop_array()
68 VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose()); in vectorwiseop_array()
73 m2 = m1; in vectorwiseop_array()
74 m2.colwise() *= colvec; in vectorwiseop_array()
75 VERIFY_IS_APPROX(m2, m1.colwise() * colvec); in vectorwiseop_array()
76 VERIFY_IS_APPROX(m2.col(c), m1.col(c) * colvec); in vectorwiseop_array()
78 VERIFY_RAISES_ASSERT(m2.colwise() *= colvec.transpose()); in vectorwiseop_array()
81 m2 = m1; in vectorwiseop_array()
82 m2.rowwise() *= rowvec; in vectorwiseop_array()
83 VERIFY_IS_APPROX(m2, m1.rowwise() * rowvec); in vectorwiseop_array()
84 VERIFY_IS_APPROX(m2.row(r), m1.row(r) * rowvec); in vectorwiseop_array()
86 VERIFY_RAISES_ASSERT(m2.rowwise() *= rowvec.transpose()); in vectorwiseop_array()
91 m2 = m1; in vectorwiseop_array()
92 m2.colwise() /= colvec; in vectorwiseop_array()
93 VERIFY_IS_APPROX(m2, m1.colwise() / colvec); in vectorwiseop_array()
94 VERIFY_IS_APPROX(m2.col(c), m1.col(c) / colvec); in vectorwiseop_array()
96 VERIFY_RAISES_ASSERT(m2.colwise() /= colvec.transpose()); in vectorwiseop_array()
99 m2 = m1; in vectorwiseop_array()
100 m2.rowwise() /= rowvec; in vectorwiseop_array()
101 VERIFY_IS_APPROX(m2, m1.rowwise() / rowvec); in vectorwiseop_array()
102 VERIFY_IS_APPROX(m2.row(r), m1.row(r) / rowvec); in vectorwiseop_array()
104 VERIFY_RAISES_ASSERT(m2.rowwise() /= rowvec.transpose()); in vectorwiseop_array()
107 m2 = m1; in vectorwiseop_array()
109 // is supposed to evaluate " m2.colwise().sum()" into a temporary to avoid in vectorwiseop_array()
113 m2.rowwise() /= m2.colwise().sum(); in vectorwiseop_array()
114 VERIFY_IS_APPROX(m2, m1.rowwise() / m1.colwise().sum()); in vectorwiseop_array()
146 m2(rows, cols), in vectorwiseop_matrix() local
156 m2 = m1; in vectorwiseop_matrix()
157 m2.colwise() += colvec; in vectorwiseop_matrix()
158 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_matrix()
159 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_matrix()
163 VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose()); in vectorwiseop_matrix()
167 m2 = m1; in vectorwiseop_matrix()
168 m2.rowwise() += rowvec; in vectorwiseop_matrix()
169 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_matrix()
170 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_matrix()
174 VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose()); in vectorwiseop_matrix()
180 m2 = m1; in vectorwiseop_matrix()
181 m2.colwise() -= colvec; in vectorwiseop_matrix()
182 VERIFY_IS_APPROX(m2, m1.colwise() - colvec); in vectorwiseop_matrix()
183 VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec); in vectorwiseop_matrix()
187 VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose()); in vectorwiseop_matrix()
191 m2 = m1; in vectorwiseop_matrix()
192 m2.rowwise() -= rowvec; in vectorwiseop_matrix()
193 VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec); in vectorwiseop_matrix()
194 VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec); in vectorwiseop_matrix()
198 VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose()); in vectorwiseop_matrix()
217 m2 = m1.colwise().normalized(); in vectorwiseop_matrix()
218 VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized()); in vectorwiseop_matrix()
219 m2 = m1.rowwise().normalized(); in vectorwiseop_matrix()
220 VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized()); in vectorwiseop_matrix()
223 m2 = m1; in vectorwiseop_matrix()
224 m2.colwise().normalize(); in vectorwiseop_matrix()
225 VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized()); in vectorwiseop_matrix()
226 m2 = m1; in vectorwiseop_matrix()
227 m2.rowwise().normalize(); in vectorwiseop_matrix()
228 VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized()); in vectorwiseop_matrix()
236 m2 = m1.rowwise() - (m1.colwise().sum()/RealScalar(m1.rows())).eval(); in vectorwiseop_matrix()
238 VERIFY_IS_APPROX( m1, m2 ); in vectorwiseop_matrix()
239 …VERIFY_EVALUATION_COUNT( m2 = (m1.rowwise() - m1.colwise().sum()/RealScalar(m1.rows())), (MatrixTy… in vectorwiseop_matrix()