11 #define TEST_ENABLE_TEMPORARY_TRACKING 12 #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 38 p *= m1_for_prod(
i,
j);
51 Index r0 = internal::random<Index>(0,rows-1);
52 Index c0 = internal::random<Index>(0,cols-1);
55 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).sum(), m1.block(r0,c0,r1,c1).eval().sum());
56 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).mean(), m1.block(r0,c0,r1,c1).eval().mean());
57 VERIFY_IS_APPROX(m1_for_prod.block(r0,c0,r1,c1).prod(), m1_for_prod.block(r0,c0,r1,c1).eval().prod());
58 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().minCoeff(), m1.block(r0,c0,r1,c1).real().eval().minCoeff());
59 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().maxCoeff(), m1.block(r0,c0,r1,c1).real().eval().maxCoeff());
62 const int R1 = MatrixType::RowsAtCompileTime>=2 ? MatrixType::RowsAtCompileTime/2 : 6;
63 const int C1 = MatrixType::ColsAtCompileTime>=2 ? MatrixType::ColsAtCompileTime/2 : 6;
64 if(R1<=rows-r0 && C1<=cols-c0)
66 VERIFY_IS_APPROX( (m1.template block<R1,C1>(r0,c0).sum()), m1.block(r0,c0,R1,C1).sum() );
74 VERIFY_EVALUATION_COUNT( (m1.matrix()*m1.matrix().transpose()).
sum(), (MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1) );
77 VERIFY_EVALUATION_COUNT( ((m1.matrix()*m1.matrix().transpose())+m2).sum(),(MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1));
94 for(
int j = 0;
j <
i;
j++)
107 for(
int i = 0;
i < size-1;
i++)
124 for(
int i = 0;
i < size/2;
i++)
128 for(
int j =
i;
j < size-
i;
j++)
163 CALL_SUBTEST_4(
matrixRedux(MatrixXcf(internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
164 CALL_SUBTEST_4(
matrixRedux(ArrayXXcf(internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
165 CALL_SUBTEST_5(
matrixRedux(MatrixXd (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
166 CALL_SUBTEST_5(
matrixRedux(ArrayXXd (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
167 CALL_SUBTEST_6(
matrixRedux(MatrixXi (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
168 CALL_SUBTEST_6(
matrixRedux(ArrayXXi (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );
173 CALL_SUBTEST_5(
vectorRedux(VectorXd(internal::random<int>(1,maxsize))) );
174 CALL_SUBTEST_5(
vectorRedux(ArrayXd(internal::random<int>(1,maxsize))) );
175 CALL_SUBTEST_8(
vectorRedux(VectorXf(internal::random<int>(1,maxsize))) );
176 CALL_SUBTEST_8(
vectorRedux(ArrayXf(internal::random<int>(1,maxsize))) );
#define VERIFY_RAISES_ASSERT(a)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Point3 mean(const CONTAINER &points)
mean
void vectorRedux(const VectorType &w)
#define VERIFY_EVALUATION_COUNT(XPR, N)
#define VERIFY_IS_APPROX(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
Q R1(Eigen::AngleAxisd(1, Q_z_axis))
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
#define EIGEN_TEST_MAX_SIZE
General-purpose arrays with easy API for coefficient-wise operations.
The matrix class, also used for vectors and row-vectors.
void matrixRedux(const MatrixType &m)
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)