diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-09 16:29:46 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-09 16:29:46 +0000 |
commit | f2cf177e93d4578b404909c68b24625a76466ee5 (patch) | |
tree | 28dabd5ae200ad1fbfdf41333599bb6ecccc571f /lib/LAPACK | |
parent | 7931a9b18ea84ed5f49e2803ba596f190567d9d8 (diff) |
eigC
Diffstat (limited to 'lib/LAPACK')
-rw-r--r-- | lib/LAPACK/Internal.hs | 4 |
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. |
78 | eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) | 78 | eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) |
79 | eigC (m@M {rows = r}) = unsafePerformIO $ do | 79 | eigC (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 |