11 #define TEST_ENABLE_TEMPORARY_TRACKING
12 #define EIGEN_NO_STATIC_ASSERT
24 Index r = internal::random<Index>(0,
rows-1),
25 c = internal::random<Index>(0,
cols-1);
31 ColVectorType colvec = ColVectorType::Random(
rows);
32 RowVectorType rowvec = RowVectorType::Random(
cols);
37 m2.colwise() += colvec;
45 m2.rowwise() += rowvec;
55 m2.colwise() -= colvec;
63 m2.rowwise() -= rowvec;
73 m2.colwise() *= colvec;
81 m2.rowwise() *= rowvec;
91 m2.colwise() /= colvec;
99 m2.rowwise() /= rowvec;
110 if(ArrayType::RowsAtCompileTime>2 || ArrayType::RowsAtCompileTime==
Dynamic)
112 m2.rowwise() /=
m2.colwise().sum();
118 mb = (
m1.real()<=0.7).colwise().all();
120 mb = (
m1.real()<=0.7).rowwise().all();
123 mb = (
m1.real()>=0.7).colwise().any();
124 VERIFY( (mb.col(
c) == (
m1.real().col(
c)>=0.7).any()).
all() );
125 mb = (
m1.real()>=0.7).rowwise().any();
126 VERIFY( (mb.row(r) == (
m1.real().row(r)>=0.7).any()).
all() );
141 Index r = internal::random<Index>(0,
rows-1),
142 c = internal::random<Index>(0,
cols-1);
148 ColVectorType colvec = ColVectorType::Random(
rows);
149 RowVectorType rowvec = RowVectorType::Random(
cols);
150 RealColVectorType rcres;
151 RealRowVectorType rrres;
155 m2.colwise() = colvec;
158 m2.rowwise() = rowvec;
169 m2.colwise() += colvec;
180 m2.rowwise() += rowvec;
193 m2.colwise() -= colvec;
204 m2.rowwise() -= rowvec;
216 #define TEST_PARTIAL_REDUX_BASIC(FUNC,ROW,COL,PREPROCESS) { \
217 ROW = m1 PREPROCESS .colwise().FUNC ; \
218 for(Index k=0; k<cols; ++k) VERIFY_IS_APPROX(ROW(k), m1.col(k) PREPROCESS .FUNC ); \
219 COL = m1 PREPROCESS .rowwise().FUNC ; \
220 for(Index k=0; k<rows; ++k) VERIFY_IS_APPROX(COL(k), m1.row(k) PREPROCESS .FUNC ); \
241 m2 =
m1.colwise().normalized();
243 m2 =
m1.rowwise().normalized();
248 m2.colwise().normalize();
251 m2.rowwise().normalize();
282 VERIFY_IS_EQUAL(
m1.real().middleRows(0,fix<0>).rowwise().maxCoeff().eval().rows(),0);
283 VERIFY_IS_EQUAL(
m1.real().middleCols(0,fix<0>).colwise().maxCoeff().eval().cols(),0);