summaryrefslogtreecommitdiff
path: root/lib/LAPACK.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-09-10 09:13:20 +0000
committerAlberto Ruiz <aruiz@um.es>2007-09-10 09:13:20 +0000
commit89651db9f2577ba42dbbb91c85565a12f34d0fb2 (patch)
treecf7c5d023c2fe4bda50a4428c2171bd2f9ef83a2 /lib/LAPACK.hs
parent631a32fbdc0d61f647d3217da86bcb1d552e5e5a (diff)
simplified
Diffstat (limited to 'lib/LAPACK.hs')
-rw-r--r--lib/LAPACK.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/LAPACK.hs b/lib/LAPACK.hs
index ba72681..2b92a2a 100644
--- a/lib/LAPACK.hs
+++ b/lib/LAPACK.hs
@@ -26,7 +26,8 @@ import Data.Packed.Internal.Vector
26import Data.Packed.Internal.Matrix 26import Data.Packed.Internal.Matrix
27import Data.Packed.Vector 27import Data.Packed.Vector
28import Data.Packed.Matrix 28import Data.Packed.Matrix
29import LinearAlgebra.Linear(scale) 29--import LinearAlgebra.Linear(scale)
30import GSL.Vector(vectorMapValR, FunCodeSV(Scale))
30import Complex 31import Complex
31import Foreign 32import Foreign
32 33
@@ -146,8 +147,7 @@ fixeig [r] [v] = [comp v]
146fixeig ((r1:+i1):(r2:+i2):r) (v1:v2:vs) 147fixeig ((r1:+i1):(r2:+i2):r) (v1:v2:vs)
147 | r1 == r2 && i1 == (-i2) = toComplex (v1,v2) : toComplex (v1,scale (-1) v2) : fixeig r vs 148 | r1 == r2 && i1 == (-i2) = toComplex (v1,v2) : toComplex (v1,scale (-1) v2) : fixeig r vs
148 | otherwise = comp v1 : fixeig ((r2:+i2):r) (v2:vs) 149 | otherwise = comp v1 : fixeig ((r2:+i2):r) (v2:vs)
149 150 where scale = vectorMapValR Scale
150-- scale r v = fromList [r] `outer` v
151 151
152----------------------------------------------------------------------------- 152-----------------------------------------------------------------------------
153foreign import ccall "LAPACK/lapack-aux.h eig_l_S" dsyev :: TMVM 153foreign import ccall "LAPACK/lapack-aux.h eig_l_S" dsyev :: TMVM