mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -1,12 +1,11 @@
|
||||
Matrix3i m = Matrix3i::Random();
|
||||
cout << "Here is the initial matrix m:" << endl << m << endl;
|
||||
int i = -1;
|
||||
for(auto c: m.colwise()) {
|
||||
for (auto c : m.colwise()) {
|
||||
c *= i;
|
||||
++i;
|
||||
}
|
||||
cout << "Here is the matrix m after the for-range-loop:" << endl << m << endl;
|
||||
auto cols = m.colwise();
|
||||
auto it = std::find_if(cols.cbegin(), cols.cend(),
|
||||
[](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });
|
||||
cout << "The first empty column is: " << distance(cols.cbegin(),it) << endl;
|
||||
auto it = std::find_if(cols.cbegin(), cols.cend(), [](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });
|
||||
cout << "The first empty column is: " << distance(cols.cbegin(), it) << endl;
|
||||
|
||||
Reference in New Issue
Block a user