Lines Matching full:m1

26   ArrayType m1 = ArrayType::Random(rows, cols),  in vectorwiseop_array()  local
35 m2 = m1; 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()
41 VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose()); in vectorwiseop_array()
43 m2 = m1; 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()
49 VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose()); in vectorwiseop_array()
53 m2 = m1; 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()
59 VERIFY_RAISES_ASSERT(m1.colwise() - colvec.transpose()); in vectorwiseop_array()
61 m2 = m1; 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()
67 VERIFY_RAISES_ASSERT(m1.rowwise() - rowvec.transpose()); in vectorwiseop_array()
71 m2 = m1; 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()
77 VERIFY_RAISES_ASSERT(m1.colwise() * colvec.transpose()); in vectorwiseop_array()
79 m2 = m1; 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()
85 VERIFY_RAISES_ASSERT(m1.rowwise() * rowvec.transpose()); in vectorwiseop_array()
89 m2 = m1; 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()
95 VERIFY_RAISES_ASSERT(m1.colwise() / colvec.transpose()); in vectorwiseop_array()
97 m2 = m1; 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()
103 VERIFY_RAISES_ASSERT(m1.rowwise() / rowvec.transpose()); in vectorwiseop_array()
105 m2 = m1; in vectorwiseop_array()
112 VERIFY_IS_APPROX(m2, m1.rowwise() / m1.colwise().sum()); in vectorwiseop_array()
131 MatrixType m1 = MatrixType::Random(rows, cols), in vectorwiseop_matrix() local
142 m2 = m1; 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()
148 VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose()); in vectorwiseop_matrix()
150 m2 = m1; 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()
156 VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose()); in vectorwiseop_matrix()
160 m2 = m1; 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()
166 VERIFY_RAISES_ASSERT(m1.colwise() - colvec.transpose()); in vectorwiseop_matrix()
168 m2 = m1; 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()
174 VERIFY_RAISES_ASSERT(m1.rowwise() - rowvec.transpose()); in vectorwiseop_matrix()
177 rrres = m1.colwise().norm(); in vectorwiseop_matrix()
178 VERIFY_IS_APPROX(rrres(c), m1.col(c).norm()); in vectorwiseop_matrix()
179 rcres = m1.rowwise().norm(); in vectorwiseop_matrix()
180 VERIFY_IS_APPROX(rcres(r), m1.row(r).norm()); 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()
191 VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized()); in vectorwiseop_matrix()
192 m2 = m1; in vectorwiseop_matrix()
194 VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized()); in vectorwiseop_matrix()