Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
i
m
n
p
r
s
t
u
w
Variables
_
a
b
c
d
e
f
h
i
l
m
n
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
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
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
b
c
d
e
f
i
j
l
m
n
o
p
s
t
v
w
x
y
Typedefs
_
a
b
c
d
e
f
i
k
l
m
n
p
q
r
s
t
v
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
v
z
Functions
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
v
z
Macros
_
b
e
n
p
unittest
python
test_LLT.py
Go to the documentation of this file.
1
import
numpy
as
np
2
3
import
eigenpy
4
5
dim = 100
6
rng = np.random.default_rng()
7
8
A = rng.random((dim, dim))
9
A = (A + A.T) * 0.5 + np.diag(10.0 + rng.random(dim))
10
11
llt = eigenpy.LLT(A)
12
13
L = llt.matrixL()
14
assert
eigenpy.is_approx
(L.dot(np.transpose(L)), A)
15
16
X = rng.random((dim, 20))
17
B = A.dot(X)
18
X_est = llt.solve(B)
19
assert
eigenpy.is_approx
(X, X_est)
20
assert
eigenpy.is_approx
(A.dot(X_est), B)
eigenpy::is_approx
EIGEN_DONT_INLINE bool is_approx(const Eigen::SparseMatrixBase< MatrixType1 > &mat1, const Eigen::SparseMatrixBase< MatrixType2 > &mat2)
Definition:
is-approx.hpp:36
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Feb 14 2025 03:16:26