summaryrefslogtreecommitdiff
path: root/lib/LAPACK
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-06-09 16:29:46 +0000
committerAlberto Ruiz <aruiz@um.es>2007-06-09 16:29:46 +0000
commitf2cf177e93d4578b404909c68b24625a76466ee5 (patch)
tree28dabd5ae200ad1fbfdf41333599bb6ecccc571f /lib/LAPACK
parent7931a9b18ea84ed5f49e2803ba596f190567d9d8 (diff)
eigC
Diffstat (limited to 'lib/LAPACK')
-rw-r--r--lib/LAPACK/Internal.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/LAPACK/Internal.hs b/lib/LAPACK/Internal.hs
index e39dd10..e3c9927 100644
--- a/lib/LAPACK/Internal.hs
+++ b/lib/LAPACK/Internal.hs
@@ -76,7 +76,9 @@ foreign import ccall "lapack-aux.h eig_l_C"
76-- The eigenvectors are the columns of v. 76-- The eigenvectors are the columns of v.
77-- The eigenvalues are not sorted. 77-- The eigenvalues are not sorted.
78eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) 78eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double))
79eigC (m@M {rows = r}) = unsafePerformIO $ do 79eigC (m@M {rows = r})
80 | r == 1 = (fromList [cdat m `at` 0], singleton 1)
81 | otherwise = unsafePerformIO $ do
80 l <- createVector r 82 l <- createVector r
81 v <- createMatrix ColumnMajor r r 83 v <- createMatrix ColumnMajor r r
82 dummy <- createMatrix ColumnMajor 1 1 84 dummy <- createMatrix ColumnMajor 1 1