23 for (
Index i2 = 0; i2 <
i; i2++)
25 m(
i) = internal::random<Scalar>();
28 Index minrow = 0, mincol = 0, maxrow = 0, maxcol = 0;
42 Index eigen_minrow, eigen_mincol, eigen_maxrow, eigen_maxcol;
43 Scalar eigen_minc, eigen_maxc;
44 eigen_minc =
m.minCoeff(&eigen_minrow, &eigen_mincol);
45 eigen_maxc =
m.maxCoeff(&eigen_maxrow, &eigen_maxcol);
46 VERIFY(minrow == eigen_minrow);
47 VERIFY(maxrow == eigen_maxrow);
48 VERIFY(mincol == eigen_mincol);
49 VERIFY(maxcol == eigen_maxcol);
55 eigen_maxc = (
m.adjoint() *
m).maxCoeff(&eigen_maxrow, &eigen_maxcol);
56 Index maxrow2 = 0, maxcol2 = 0;
57 eigen_maxc = (
m.adjoint() *
m).
eval().maxCoeff(&maxrow2, &maxcol2);
58 VERIFY(maxrow2 == eigen_maxrow);
59 VERIFY(maxcol2 == eigen_maxcol);
66 if (!(
j == mincol &&
i == minrow) && !(
j == maxcol &&
i == maxrow)) {
74 eigen_minc =
m.template minCoeff<PropagateNumbers>(&eigen_minrow, &eigen_mincol);
75 eigen_maxc =
m.template maxCoeff<PropagateNumbers>(&eigen_maxrow, &eigen_maxcol);
76 VERIFY(minrow == eigen_minrow);
77 VERIFY(maxrow == eigen_maxrow);
78 VERIFY(mincol == eigen_mincol);
79 VERIFY(maxcol == eigen_maxcol);
85 eigen_minc =
m.template minCoeff<PropagateNaN>(&eigen_minrow, &eigen_mincol);
86 eigen_maxc =
m.template maxCoeff<PropagateNaN>(&eigen_maxrow, &eigen_maxcol);
87 VERIFY(minrow != eigen_minrow || mincol != eigen_mincol);
88 VERIFY(maxrow != eigen_maxrow || maxcol != eigen_maxcol);
94 eigen_minc =
m.template minCoeff<PropagateNumbers>(&eigen_minrow, &eigen_mincol);
95 eigen_maxc =
m.template maxCoeff<PropagateNumbers>(&eigen_maxrow, &eigen_maxcol);
103 eigen_minc =
m.template minCoeff<PropagateNaN>(&eigen_minrow, &eigen_mincol);
104 eigen_maxc =
m.template maxCoeff<PropagateNaN>(&eigen_maxrow, &eigen_maxcol);
105 VERIFY(eigen_minrow == 0);
106 VERIFY(eigen_maxrow == 0);
107 VERIFY(eigen_mincol == 0);
108 VERIFY(eigen_maxcol == 0);
112 eigen_minc =
m.template minCoeff<PropagateFast>(&eigen_minrow, &eigen_mincol);
113 eigen_maxc =
m.template maxCoeff<PropagateFast>(&eigen_maxrow, &eigen_maxcol);
114 VERIFY(eigen_minrow == 0);
115 VERIFY(eigen_maxrow == 0);
116 VERIFY(eigen_mincol == 0);
117 VERIFY(eigen_maxcol == 0);
float * p
Definition: Tutorial_Map_using.cpp:9
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
#define VERIFY_IS_APPROX(a, b)
Definition: integer_types.cpp:13
int * m
Definition: level2_cplx_impl.h:294
#define VERIFY(a)
Definition: main.h:362
#define isnan(X)
Definition: main.h:109
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool equal_strict(const X &x, const Y &y)
Definition: Meta.h:571
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217