diff options
author | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-09-06 09:59:08 +0000 |
---|---|---|
committer | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-09-06 09:59:08 +0000 |
commit | 9004922ad91c0b4ad8498c31171a3a1a1e27d9f2 (patch) | |
tree | c6d4759e584b7933029e405a73974e173046ddcc /lib/Data/Packed/Internal | |
parent | 29099e3bfb4eec87ac3d4d675d7cfc82234c20d6 (diff) |
Merged changes with conversion-linear
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index 100b8ea..e66817e 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -29,7 +29,6 @@ module Data.Packed.Internal.Matrix( | |||
29 | liftMatrix, liftMatrix2, | 29 | liftMatrix, liftMatrix2, |
30 | (@@>), | 30 | (@@>), |
31 | saveMatrix, | 31 | saveMatrix, |
32 | fromComplexV, toComplexV, conjV, | ||
33 | singleton | 32 | singleton |
34 | ) where | 33 | ) where |
35 | 34 | ||
@@ -386,21 +385,6 @@ subMatrix' (r0,c0) (rt,ct) m = trans $ subMatrix' (c0,r0) (ct,rt) (trans m) | |||
386 | 385 | ||
387 | -------------------------------------------------------------------------- | 386 | -------------------------------------------------------------------------- |
388 | 387 | ||
389 | -- | obtains the complex conjugate of a complex vector | ||
390 | conjV :: (Storable a, RealFloat a) => Vector (Complex a) -> Vector (Complex a) | ||
391 | conjV = mapVector conjugate | ||
392 | |||
393 | -- | creates a complex vector from vectors with real and imaginary parts | ||
394 | toComplexV :: (RealFloat a, Element a) => (Vector a, Vector a) -> Vector (Complex a) | ||
395 | toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i] | ||
396 | |||
397 | -- | the inverse of 'toComplex' | ||
398 | fromComplexV :: (RealFloat a, Element a) => Vector (Complex a) -> (Vector a, Vector a) | ||
399 | fromComplexV z = (r,i) where | ||
400 | [r,i] = toColumns $ reshape 2 $ asReal z | ||
401 | |||
402 | -------------------------------------------------------------------------- | ||
403 | |||
404 | -- | Saves a matrix as 2D ASCII table. | 388 | -- | Saves a matrix as 2D ASCII table. |
405 | saveMatrix :: FilePath | 389 | saveMatrix :: FilePath |
406 | -> String -- ^ format (%f, %g, %e) | 390 | -> String -- ^ format (%f, %g, %e) |