Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
c775c555
Verified
Commit
c775c555
authored
Jan 29, 2020
by
Justin Carpentier
Browse files
test: test LLT
parent
da1e7b30
Changes
2
Hide whitespace changes
Inline
Side-by-side
unittest/CMakeLists.txt
View file @
c775c555
...
...
@@ -54,3 +54,6 @@ SET_TESTS_PROPERTIES("py-eigen-solver" PROPERTIES DEPENDS ${PYWRAP})
ADD_PYTHON_UNIT_TEST
(
"py-self-adjoint-eigen-solver"
"unittest/python/test_self_adjoint_eigen_solver.py"
"python/eigenpy"
)
SET_TESTS_PROPERTIES
(
"py-self-adjoint-eigen-solver"
PROPERTIES DEPENDS
${
PYWRAP
}
)
ADD_PYTHON_UNIT_TEST
(
"py-LLT"
"unittest/python/test_LLT.py"
"python/eigenpy"
)
SET_TESTS_PROPERTIES
(
"py-LLT"
PROPERTIES DEPENDS
${
PYWRAP
}
)
unittest/python/test_LLT.py
0 → 100644
View file @
c775c555
import
eigenpy
eigenpy
.
switchToNumpyArray
()
import
numpy
as
np
import
numpy.linalg
as
la
dim
=
100
A
=
np
.
random
.
rand
(
dim
,
dim
)
A
=
(
A
+
A
.
T
)
*
0.5
+
np
.
diag
(
10.
+
np
.
random
.
rand
(
dim
))
llt
=
eigenpy
.
LLT
(
A
)
L
=
llt
.
matrixL
()
assert
eigenpy
.
is_approx
(
L
.
dot
(
np
.
transpose
(
L
)),
A
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment