Eigen 3.4.90
Main Page
Related Pages
Modules
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
h
i
k
m
n
o
p
q
r
s
t
u
v
Related Functions
o
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
x
y
Typedefs
a
b
c
d
e
f
i
l
m
n
r
s
t
u
Macros
_
a
b
c
d
e
f
g
h
l
m
p
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
doc
snippets
MatrixBase_colwise_iterator_cxx11.cpp
Go to the documentation of this file.
1
Matrix3i
m
= Matrix3i::Random();
2
cout <<
"Here is the initial matrix m:"
<< endl <<
m
<< endl;
3
int
i
= -1;
4
for
(
auto
c
:
m
.colwise()) {
5
c
*=
i
;
6
++
i
;
7
}
8
cout <<
"Here is the matrix m after the for-range-loop:"
<< endl <<
m
<< endl;
9
auto
cols
=
m
.colwise();
10
auto
it = std::find_if(
cols
.cbegin(),
cols
.cend(),
11
[](Matrix3i::ConstColXpr
x
) { return x.squaredNorm() == 0; });
12
cout <<
"The first empty column is: "
<< distance(
cols
.cbegin(),it) << endl;
x
x
Definition:
BiCGSTAB_simple.cpp:7
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
c
Array33i c
Definition:
Cwise_product.cpp:2
m
Matrix3i m
Definition:
MatrixBase_colwise_iterator_cxx11.cpp:1
cols
int cols
Definition:
Tutorial_commainit_02.cpp:1
Eigen::Matrix3i
Matrix< int, 3, 3 > Matrix3i
3×3 matrix of type int.
Definition:
Matrix.h:500
Code