108 Index r = internal::random<Index>(0,
rows - 1),
c = internal::random<Index>(0,
cols - 1);
112 ColVectorType colvec = ColVectorType::Random(
rows);
113 RowVectorType rowvec = RowVectorType::Random(
cols);
114 RealColVectorType rcres;
115 RealRowVectorType rrres;
119 m2.colwise() = colvec;
121 m2.rowwise() = rowvec;
126 m2.colwise() += colvec;
131 m2.rowwise() += rowvec;
137 m2.colwise() -= colvec;
142 m2.rowwise() -= rowvec;
148 #define TEST_PARTIAL_REDUX_BASIC(FUNC, ROW, COL, PREPROCESS) \
150 ROW = m1 PREPROCESS.colwise().FUNC; \
151 for (Index k = 0; k < cols; ++k) VERIFY_IS_APPROX(ROW(k), m1.col(k) PREPROCESS.FUNC); \
152 COL = m1 PREPROCESS.rowwise().FUNC; \
153 for (Index k = 0; k < rows; ++k) VERIFY_IS_APPROX(COL(k), m1.row(k) PREPROCESS.FUNC); \
174 m2 =
m1.colwise().normalized();
176 m2 =
m1.rowwise().normalized();
181 m2.colwise().normalize();
184 m2.rowwise().normalize();
197 (MatrixType::RowsAtCompileTime != 1 ? 1 : 0));
211 VERIFY_IS_EQUAL(
m1.real().middleRows(0, 0).rowwise().maxCoeff().eval().rows(), 0);
212 VERIFY_IS_EQUAL(
m1.real().middleCols(0, 0).colwise().maxCoeff().eval().cols(), 0);
213 VERIFY_IS_EQUAL(
m1.real().middleRows(0, fix<0>).rowwise().maxCoeff().eval().rows(), 0);
214 VERIFY_IS_EQUAL(
m1.real().middleCols(0, fix<0>).colwise().maxCoeff().eval().cols(), 0);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_EMPTY
Definition: Macros.h:1081
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
float real
Definition: datatypes.h:10
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
#define VERIFY_IS_EQUAL(a, b)
Definition: main.h:367
double Zero
Definition: pseudosolid_node_update_elements.cc:35
EIGEN_DONT_INLINE void prod(const Lhs &a, const Rhs &b, Res &c)
Definition: product_threshold.cpp:53
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
#define VERIFY_EVALUATION_COUNT(XPR, N)
Definition: test/sparse_product.cpp:28
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
#define TEST_PARTIAL_REDUX_BASIC(FUNC, ROW, COL, PREPROCESS)