17 (
m.colwise() -
v).colwise().squaredNorm().minCoeff(&index);
19 std::cout <<
"Nearest neighbour is column " << index <<
":" << std::endl;
20 std::cout <<
m.col(index) << std::endl;
Array< int, Dynamic, 1 > v
The matrix class, also used for vectors and row-vectors.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.