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;
130 CALL_SUBTEST_2(
reverse(Matrix2f()) );
131 CALL_SUBTEST_3(
reverse(Matrix4f()) );
132 CALL_SUBTEST_4(
reverse(Matrix4d()) );
139 #ifdef EIGEN_TEST_PART_3 140 Vector4f
x; x << 1, 2, 3, 4;
141 Vector4f
y; y << 4, 3, 2, 1;
142 VERIFY(x.reverse()[1] == 3);
void test_array_reverse()
#define VERIFY_IS_APPROX(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void reverse(const MatrixType &m)
#define EIGEN_TEST_MAX_SIZE
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