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
Triangular_solve.cpp
Go to the documentation of this file.
1
Matrix3d
m
= Matrix3d::Zero();
2
m
.triangularView<
Eigen::Upper
>().
setOnes
();
3
cout <<
"Here is the matrix m:\n"
<<
m
<< endl;
4
Matrix3d
n
= Matrix3d::Ones();
5
n
.triangularView<
Eigen::Lower
>() *= 2;
6
cout <<
"Here is the matrix n:\n"
<<
n
<< endl;
7
cout <<
"And now here is m.inverse()*n, taking advantage of the fact that"
8
" m is upper-triangular:\n"
9
<<
m
.triangularView<
Eigen::Upper
>().solve(
n
) << endl;
10
cout <<
"And this is n*m.inverse():\n"
11
<<
m
.triangularView<
Eigen::Upper
>().solve<Eigen::OnTheRight>(
n
);
n
int n
Definition:
BiCGSTAB_simple.cpp:1
setOnes
v setOnes(3)
m
Matrix3d m
Definition:
Triangular_solve.cpp:1
Eigen::Lower
@ Lower
Definition:
Constants.h:211
Eigen::Upper
@ Upper
Definition:
Constants.h:213
Eigen::Matrix3d
Matrix< double, 3, 3 > Matrix3d
3×3 matrix of type double.
Definition:
Matrix.h:502
Code