summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs14
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
371conj :: Vector (Complex Double) -> Vector (Complex Double) 371conjV :: Vector (Complex Double) -> Vector (Complex Double)
372conj = mapVector conjugate 372conjV = 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
375toComplex :: (Vector Double, Vector Double) -> Vector (Complex Double) 375toComplexV :: (Vector Double, Vector Double) -> Vector (Complex Double)
376toComplex (r,i) = asComplex $ flatten $ fromColumns [r,i] 376toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i]
377 377
378-- | the inverse of 'toComplex' 378-- | the inverse of 'toComplex'
379fromComplex :: Vector (Complex Double) -> (Vector Double, Vector Double) 379fromComplexV :: Vector (Complex Double) -> (Vector Double, Vector Double)
380fromComplex z = (r,i) where 380fromComplexV z = (r,i) where
381 [r,i] = toColumns $ reshape 2 $ asReal z 381 [r,i] = toColumns $ reshape 2 $ asReal z
382 382
383-------------------------------------------------------------------------- 383--------------------------------------------------------------------------