summaryrefslogtreecommitdiff
path: root/lib/LinearAlgebra/LAPACK.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-10-01 09:43:19 +0000
committerAlberto Ruiz <aruiz@um.es>2007-10-01 09:43:19 +0000
commit768f08d4134a066d773d56a9c03ae688e3850352 (patch)
tree99cbfc8c7a547d4e2c65c8ff22a525d05f5b1f49 /lib/LinearAlgebra/LAPACK.hs
parent13dfe14e171941b3ca82cd858973e3681d7b254e (diff)
check hermitian on chol and eigSH
Diffstat (limited to 'lib/LinearAlgebra/LAPACK.hs')
-rw-r--r--lib/LinearAlgebra/LAPACK.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/LinearAlgebra/LAPACK.hs b/lib/LinearAlgebra/LAPACK.hs
index 2861061..c6908e3 100644
--- a/lib/LinearAlgebra/LAPACK.hs
+++ b/lib/LinearAlgebra/LAPACK.hs
@@ -15,7 +15,7 @@
15 15
16module LinearAlgebra.LAPACK ( 16module LinearAlgebra.LAPACK (
17 svdR, svdRdd, svdC, 17 svdR, svdRdd, svdC,
18 eigC, eigR, eigS, eigH, 18 eigC, eigR, eigS, eigH, eigS', eigH',
19 linearSolveR, linearSolveC, 19 linearSolveR, linearSolveC,
20 linearSolveLSR, linearSolveLSC, 20 linearSolveLSR, linearSolveLSC,
21 linearSolveSVDR, linearSolveSVDC, 21 linearSolveSVDR, linearSolveSVDC,
@@ -166,7 +166,7 @@ foreign import ccall "LAPACK/lapack-aux.h eig_l_H" zheev :: TCMVCM
166-- if @(l,v)=eigH m@ then @m \<\> s v = v \<\> diag l@. 166-- if @(l,v)=eigH m@ then @m \<\> s v = v \<\> diag l@.
167-- 167--
168-- The eigenvectors are the columns of v. 168-- The eigenvectors are the columns of v.
169-- The eigenvalues are sorted in descending order. 169-- The eigenvalues are sorted in descending order (use eigH' for ascending order).
170eigH :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double)) 170eigH :: Matrix (Complex Double) -> (Vector Double, Matrix (Complex Double))
171eigH m = (s', fliprl v) 171eigH m = (s', fliprl v)
172 where (s,v) = eigH' m 172 where (s,v) = eigH' m