Home | History | Annotate | Download | only in test

Lines Matching refs:reverse

16 template<typename MatrixType> void reverse(const MatrixType& m)
30 MatrixType m1_r = m1.reverse();
31 // Verify that MatrixBase::reverse() works
38 Reverse<MatrixType> m1_rd(m1);
39 // Verify that a Reverse default (in both directions) of an expression works
46 Reverse<MatrixType, BothDirections> m1_rb(m1);
47 // Verify that a Reverse in both directions of an expression works
54 Reverse<MatrixType, Vertical> m1_rv(m1);
55 // Verify that a Reverse in the vertical directions of an expression works
62 Reverse<MatrixType, Horizontal> m1_rh(m1);
63 // Verify that a Reverse in the horizontal directions of an expression works
70 VectorType v1_r = v1.reverse();
71 // Verify that a VectorType::reverse() of an expression works
76 MatrixType m1_cr = m1.colwise().reverse();
77 // Verify that PartialRedux::reverse() works (for colwise())
84 MatrixType m1_rr = m1.rowwise().reverse();
85 // Verify that PartialRedux::reverse() works (for rowwise())
97 m1.reverse()(r, c) = x;
102 VERIFY_IS_APPROX(m2,m1.reverse().eval());
106 VERIFY_IS_APPROX(m2.col(0),m1.col(0).reverse().eval());
110 VERIFY_IS_APPROX(m2.row(0),m1.row(0).reverse().eval());
114 VERIFY_IS_APPROX(m2,m1.rowwise().reverse().eval());
118 VERIFY_IS_APPROX(m2,m1.colwise().reverse().eval());
120 m1.colwise().reverse()(r, c) = x;
123 m1.rowwise().reverse()(r, c) = x;
130 CALL_SUBTEST_1( reverse(Matrix<float, 1, 1>()) );
131 CALL_SUBTEST_2( reverse(Matrix2f()) );
132 CALL_SUBTEST_3( reverse(Matrix4f()) );
133 CALL_SUBTEST_4( reverse(Matrix4d()) );
134 CALL_SUBTEST_5( reverse(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
135 CALL_SUBTEST_6( reverse(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
136 CALL_SUBTEST_7( reverse(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
137 CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) );
138 CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
143 VERIFY(x.reverse()[1] == 3);
144 VERIFY(x.reverse() == y);