38 std::cout <<
"[main1]\n";
39 Eigen::MatrixXi
A = Eigen::MatrixXi::Random(4, 4);
40 Eigen::Array3i ri(1, 2, 1);
42 ci << 3, 2, 1, 0, 0, 2;
44 std::cout <<
"A =" << std::endl;
45 std::cout <<
A << std::endl << std::endl;
46 std::cout <<
"A([" << ri.transpose() <<
"], [" << ci.transpose() <<
"]) =" << std::endl;
47 std::cout <<
B << std::endl;
48 std::cout <<
"[main1]\n";
50 std::cout <<
"[main2]\n";
52 std::cout <<
"A(ri+1,ci) =" << std::endl;
53 std::cout <<
B << std::endl << std::endl;
54 B =
mat_indexing(
A, Eigen::ArrayXi::LinSpaced(13, 0, 12).unaryExpr([](
int x) {
return x % 4; }),
55 Eigen::ArrayXi::LinSpaced(4, 0, 3));
56 std::cout <<
"A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) ="
58 std::cout <<
B << std::endl << std::endl;
59 std::cout <<
"[main2]\n";
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
Definition: matrices.h:74
list x
Definition: plotDoE.py:28
Eigen::CwiseNullaryOp< indexing_functor< ArgType, RowIndexType, ColIndexType >, typename indexing_functor< ArgType, RowIndexType, ColIndexType >::MatrixType > mat_indexing(const Eigen::MatrixBase< ArgType > &arg, const RowIndexType &row_indices, const ColIndexType &col_indices)
Definition: nullary_indexing.cpp:30