27 VectorType
v1 = VectorType::Random(rows);
31 for (
int i = 0;
i <
rows;
i++ ) {
32 for (
int j = 0;
j <
cols;
j++ ) {
39 for (
int i = 0;
i <
rows;
i++ ) {
40 for (
int j = 0;
j <
cols;
j++ ) {
47 for (
int i = 0;
i <
rows;
i++ ) {
48 for (
int j = 0;
j <
cols;
j++ ) {
55 for (
int i = 0;
i <
rows;
i++ ) {
56 for (
int j = 0;
j <
cols;
j++ ) {
63 for (
int i = 0;
i <
rows;
i++ ) {
64 for (
int j = 0;
j <
cols;
j++ ) {
69 VectorType v1_r = v1.reverse();
71 for (
int i = 0;
i <
rows;
i++ ) {
77 for (
int i = 0;
i <
rows;
i++ ) {
78 for (
int j = 0;
j <
cols;
j++ ) {
85 for (
int i = 0;
i <
rows;
i++ ) {
86 for (
int j = 0;
j <
cols;
j++ ) {
91 Scalar
x = internal::random<Scalar>();
93 Index r = internal::random<Index>(0, rows-1),
94 c = internal::random<Index>(0, cols-1);
96 m1.reverse()(r,
c) = x;
104 m2.col(0).reverseInPlace();
108 m2.row(0).reverseInPlace();
112 m2.rowwise().reverseInPlace();
116 m2.colwise().reverseInPlace();
119 m1.colwise().reverse()(r,
c) = x;
122 m1.rowwise().reverse()(r,
c) = x;
129 Vector4f
x; x << 1, 2, 3, 4;
130 Vector4f
y; y << 4, 3, 2, 1;
131 VERIFY(x.reverse()[1] == 3);
139 template<
typename MatrixType>
144 m2.col(0).swap(m2.col(3));
145 m2.col(1).swap(m2.col(2));
148 template<
typename MatrixType>
153 m1.col(0) = m2.col(3);
154 m1.col(1) = m2.col(2);
155 m1.col(2) = m2.col(1);
156 m1.col(3) = m2.col(0);
159 template<
typename MatrixType>
166 m2.col(0) = m2.col(3);
169 m2.col(1) = m2.col(2);
177 Matrix4f
m1 = Matrix4f::Random();
178 Matrix4f
m2 = Matrix4f::Random();
constexpr EIGEN_STRONG_INLINE array< T, N > array_reverse(array< T, N > arr)
#define CALL_SUBTEST_9(FUNC)
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
void array_reverse_extra()
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_7(FUNC)
#define EIGEN_DONT_INLINE
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
#define CALL_SUBTEST_8(FUNC)
EIGEN_DECLARE_TEST(array_reverse)
EIGEN_DONT_INLINE void bug1684_job3(MatrixType &m1, MatrixType &m2)
EIGEN_DONT_INLINE void bug1684_job1(MatrixType &m1, MatrixType &m2)
#define CALL_SUBTEST_5(FUNC)
void reverse(const MatrixType &m)
#define EIGEN_TEST_MAX_SIZE
EIGEN_DONT_INLINE void bug1684_job2(MatrixType &m1, MatrixType &m2)
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.
Expression of the reverse of a vector or matrix.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x