Go to the source code of this file.
◆ main()
Definition at line 4 of file Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp.
11 float maxNorm =
mat.colwise().sum().maxCoeff(&maxIndex);
13 std::cout <<
"Maximum sum at position " << maxIndex << std::endl;
15 std::cout <<
"The corresponding vector is: " << std::endl;
16 std::cout <<
mat.col( maxIndex ) << std::endl;
17 std::cout <<
"And its sum is is: " << maxNorm << std::endl;
The matrix class, also used for vectors and row-vectors.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.