Lines Matching full:m2

27             m2(rows, cols),  in vectorwiseop_array()  local
35 m2 = m1; in vectorwiseop_array()
36 m2.colwise() += colvec; in vectorwiseop_array()
37 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_array()
38 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_array()
40 VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose()); in vectorwiseop_array()
43 m2 = m1; in vectorwiseop_array()
44 m2.rowwise() += rowvec; in vectorwiseop_array()
45 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_array()
46 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_array()
48 VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose()); in vectorwiseop_array()
53 m2 = m1; in vectorwiseop_array()
54 m2.colwise() -= colvec; in vectorwiseop_array()
55 VERIFY_IS_APPROX(m2, m1.colwise() - colvec); in vectorwiseop_array()
56 VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec); in vectorwiseop_array()
58 VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose()); in vectorwiseop_array()
61 m2 = m1; in vectorwiseop_array()
62 m2.rowwise() -= rowvec; in vectorwiseop_array()
63 VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec); in vectorwiseop_array()
64 VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec); in vectorwiseop_array()
66 VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose()); in vectorwiseop_array()
71 m2 = m1; in vectorwiseop_array()
72 m2.colwise() *= colvec; in vectorwiseop_array()
73 VERIFY_IS_APPROX(m2, m1.colwise() * colvec); in vectorwiseop_array()
74 VERIFY_IS_APPROX(m2.col(c), m1.col(c) * colvec); in vectorwiseop_array()
76 VERIFY_RAISES_ASSERT(m2.colwise() *= colvec.transpose()); in vectorwiseop_array()
79 m2 = m1; in vectorwiseop_array()
80 m2.rowwise() *= rowvec; in vectorwiseop_array()
81 VERIFY_IS_APPROX(m2, m1.rowwise() * rowvec); in vectorwiseop_array()
82 VERIFY_IS_APPROX(m2.row(r), m1.row(r) * rowvec); in vectorwiseop_array()
84 VERIFY_RAISES_ASSERT(m2.rowwise() *= rowvec.transpose()); in vectorwiseop_array()
89 m2 = m1; in vectorwiseop_array()
90 m2.colwise() /= colvec; in vectorwiseop_array()
91 VERIFY_IS_APPROX(m2, m1.colwise() / colvec); in vectorwiseop_array()
92 VERIFY_IS_APPROX(m2.col(c), m1.col(c) / colvec); in vectorwiseop_array()
94 VERIFY_RAISES_ASSERT(m2.colwise() /= colvec.transpose()); in vectorwiseop_array()
97 m2 = m1; in vectorwiseop_array()
98 m2.rowwise() /= rowvec; in vectorwiseop_array()
99 VERIFY_IS_APPROX(m2, m1.rowwise() / rowvec); in vectorwiseop_array()
100 VERIFY_IS_APPROX(m2.row(r), m1.row(r) / rowvec); in vectorwiseop_array()
102 VERIFY_RAISES_ASSERT(m2.rowwise() /= rowvec.transpose()); in vectorwiseop_array()
105 m2 = m1; in vectorwiseop_array()
107 // is suppposed to evaluate " m2.colwise().sum()" into to temporary to avoid in vectorwiseop_array()
111 m2.rowwise() /= m2.colwise().sum(); in vectorwiseop_array()
112 VERIFY_IS_APPROX(m2, m1.rowwise() / m1.colwise().sum()); in vectorwiseop_array()
132 m2(rows, cols), in vectorwiseop_matrix() local
142 m2 = m1; in vectorwiseop_matrix()
143 m2.colwise() += colvec; in vectorwiseop_matrix()
144 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_matrix()
145 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_matrix()
147 VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose()); in vectorwiseop_matrix()
150 m2 = m1; in vectorwiseop_matrix()
151 m2.rowwise() += rowvec; in vectorwiseop_matrix()
152 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_matrix()
153 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_matrix()
155 VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose()); in vectorwiseop_matrix()
160 m2 = m1; in vectorwiseop_matrix()
161 m2.colwise() -= colvec; in vectorwiseop_matrix()
162 VERIFY_IS_APPROX(m2, m1.colwise() - colvec); in vectorwiseop_matrix()
163 VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec); in vectorwiseop_matrix()
165 VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose()); in vectorwiseop_matrix()
168 m2 = m1; in vectorwiseop_matrix()
169 m2.rowwise() -= rowvec; in vectorwiseop_matrix()
170 VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec); in vectorwiseop_matrix()
171 VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec); in vectorwiseop_matrix()
173 VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose()); in vectorwiseop_matrix()
183 m2 = m1.colwise().normalized(); in vectorwiseop_matrix()
184 VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized()); in vectorwiseop_matrix()
185 m2 = m1.rowwise().normalized(); in vectorwiseop_matrix()
186 VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized()); in vectorwiseop_matrix()
189 m2 = m1; in vectorwiseop_matrix()
190 m2.colwise().normalize(); in vectorwiseop_matrix()
191 VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized()); in vectorwiseop_matrix()
192 m2 = m1; in vectorwiseop_matrix()
193 m2.rowwise().normalize(); in vectorwiseop_matrix()
194 VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized()); in vectorwiseop_matrix()