diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index d879ee6..003e8ee 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -29,7 +29,7 @@ module Data.Packed.Internal.Matrix( | |||
29 | liftMatrix, liftMatrix2, | 29 | liftMatrix, liftMatrix2, |
30 | (@@>), | 30 | (@@>), |
31 | saveMatrix, | 31 | saveMatrix, |
32 | fromComplex, toComplex, conj, | 32 | fromComplexV, toComplexV, conjV, |
33 | singleton | 33 | singleton |
34 | ) where | 34 | ) where |
35 | 35 | ||
@@ -368,16 +368,16 @@ subMatrix' (r0,c0) (rt,ct) m = trans $ subMatrix' (c0,r0) (ct,rt) (trans m) | |||
368 | -------------------------------------------------------------------------- | 368 | -------------------------------------------------------------------------- |
369 | 369 | ||
370 | -- | obtains the complex conjugate of a complex vector | 370 | -- | obtains the complex conjugate of a complex vector |
371 | conj :: Vector (Complex Double) -> Vector (Complex Double) | 371 | conjV :: Vector (Complex Double) -> Vector (Complex Double) |
372 | conj = mapVector conjugate | 372 | conjV = mapVector conjugate |
373 | 373 | ||
374 | -- | creates a complex vector from vectors with real and imaginary parts | 374 | -- | creates a complex vector from vectors with real and imaginary parts |
375 | toComplex :: (Vector Double, Vector Double) -> Vector (Complex Double) | 375 | toComplexV :: (Vector Double, Vector Double) -> Vector (Complex Double) |
376 | toComplex (r,i) = asComplex $ flatten $ fromColumns [r,i] | 376 | toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i] |
377 | 377 | ||
378 | -- | the inverse of 'toComplex' | 378 | -- | the inverse of 'toComplex' |
379 | fromComplex :: Vector (Complex Double) -> (Vector Double, Vector Double) | 379 | fromComplexV :: Vector (Complex Double) -> (Vector Double, Vector Double) |
380 | fromComplex z = (r,i) where | 380 | fromComplexV z = (r,i) where |
381 | [r,i] = toColumns $ reshape 2 $ asReal z | 381 | [r,i] = toColumns $ reshape 2 $ asReal z |
382 | 382 | ||
383 | -------------------------------------------------------------------------- | 383 | -------------------------------------------------------------------------- |