Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -1,23 +1,19 @@
#include <iostream>
#include <Eigen/Dense>
int main()
{
Eigen::MatrixXf m(2,2);
m << 1, 2,
3, 4;
int main() {
Eigen::MatrixXf m(2, 2);
//get location of maximum
m << 1, 2, 3, 4;
// get location of maximum
Eigen::Index maxRow, maxCol;
float max = m.maxCoeff(&maxRow, &maxCol);
//get location of minimum
// get location of minimum
Eigen::Index minRow, minCol;
float min = m.minCoeff(&minRow, &minCol);
std::cout << "Max: " << max << ", at: " <<
maxRow << "," << maxCol << std::endl;
std:: cout << "Min: " << min << ", at: " <<
minRow << "," << minCol << std::endl;
std::cout << "Max: " << max << ", at: " << maxRow << "," << maxCol << std::endl;
std::cout << "Min: " << min << ", at: " << minRow << "," << minCol << std::endl;
}