• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:reverse

4 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
16 template<typename MatrixType> void reverse(const MatrixType& m) in reverse() function
29 MatrixType m1_r = m1.reverse(); in reverse()
30 // Verify that MatrixBase::reverse() works in reverse()
33 VERIFY_IS_APPROX(m1_r(i, j), m1(rows - 1 - i, cols - 1 - j)); in reverse()
37 Reverse<MatrixType> m1_rd(m1); in reverse()
38 // Verify that a Reverse default (in both directions) of an expression works in reverse()
41 VERIFY_IS_APPROX(m1_rd(i, j), m1(rows - 1 - i, cols - 1 - j)); in reverse()
45 Reverse<MatrixType, BothDirections> m1_rb(m1); in reverse()
46 // Verify that a Reverse in both directions of an expression works in reverse()
49 VERIFY_IS_APPROX(m1_rb(i, j), m1(rows - 1 - i, cols - 1 - j)); in reverse()
53 Reverse<MatrixType, Vertical> m1_rv(m1); in reverse()
54 // Verify that a Reverse in the vertical directions of an expression works in reverse()
57 VERIFY_IS_APPROX(m1_rv(i, j), m1(rows - 1 - i, j)); in reverse()
61 Reverse<MatrixType, Horizontal> m1_rh(m1); in reverse()
62 // Verify that a Reverse in the horizontal directions of an expression works in reverse()
65 VERIFY_IS_APPROX(m1_rh(i, j), m1(i, cols - 1 - j)); in reverse()
69 VectorType v1_r = v1.reverse(); in reverse()
70 // Verify that a VectorType::reverse() of an expression works in reverse()
72 VERIFY_IS_APPROX(v1_r(i), v1(rows - 1 - i)); in reverse()
75 MatrixType m1_cr = m1.colwise().reverse(); in reverse()
76 // Verify that PartialRedux::reverse() works (for colwise()) in reverse()
79 VERIFY_IS_APPROX(m1_cr(i, j), m1(rows - 1 - i, j)); in reverse()
83 MatrixType m1_rr = m1.rowwise().reverse(); in reverse()
84 // Verify that PartialRedux::reverse() works (for rowwise()) in reverse()
87 VERIFY_IS_APPROX(m1_rr(i, j), m1(i, cols - 1 - j)); in reverse()
93 Index r = internal::random<Index>(0, rows-1), in reverse()
94 c = internal::random<Index>(0, cols-1); in reverse()
96 m1.reverse()(r, c) = x; in reverse()
97 VERIFY_IS_APPROX(x, m1(rows - 1 - r, cols - 1 - c)); in reverse()
101 VERIFY_IS_APPROX(m2,m1.reverse().eval()); in reverse()
105 VERIFY_IS_APPROX(m2.col(0),m1.col(0).reverse().eval()); in reverse()
109 VERIFY_IS_APPROX(m2.row(0),m1.row(0).reverse().eval()); in reverse()
113 VERIFY_IS_APPROX(m2,m1.rowwise().reverse().eval()); in reverse()
117 VERIFY_IS_APPROX(m2,m1.colwise().reverse().eval()); in reverse()
119 m1.colwise().reverse()(r, c) = x; in reverse()
120 VERIFY_IS_APPROX(x, m1(rows - 1 - r, c)); in reverse()
122 m1.rowwise().reverse()(r, c) = x; in reverse()
123 VERIFY_IS_APPROX(x, m1(r, cols - 1 - c)); in reverse()
131 VERIFY(x.reverse()[1] == 3); in array_reverse_extra()
132 VERIFY(x.reverse() == y); in array_reverse_extra()
136 // in clang 6/7 with -O2 and AVX or AVX512 enabled.
138 // through mis-inlining of reverseInPlace or other minor changes.
180 VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval()); in bug1684()
182 VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval()); in bug1684()
186 // VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval()); in bug1684()
192 CALL_SUBTEST_1( reverse(Matrix<float, 1, 1>()) ); in EIGEN_DECLARE_TEST()
193 CALL_SUBTEST_2( reverse(Matrix2f()) ); in EIGEN_DECLARE_TEST()
194 CALL_SUBTEST_3( reverse(Matrix4f()) ); in EIGEN_DECLARE_TEST()
195 CALL_SUBTEST_4( reverse(Matrix4d()) ); in EIGEN_DECLARE_TEST()
196 …CALL_SUBTEST_5( reverse(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<i… in EIGEN_DECLARE_TEST()
197 …CALL_SUBTEST_6( reverse(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<in… in EIGEN_DECLARE_TEST()
198 …CALL_SUBTEST_7( reverse(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<i… in EIGEN_DECLARE_TEST()
199 CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) ); in EIGEN_DECLARE_TEST()
200 …CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_… in EIGEN_DECLARE_TEST()