summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal/Matrix.hs
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-06 09:59:08 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-09-06 09:59:08 +0000
commit9004922ad91c0b4ad8498c31171a3a1a1e27d9f2 (patch)
treec6d4759e584b7933029e405a73974e173046ddcc /lib/Data/Packed/Internal/Matrix.hs
parent29099e3bfb4eec87ac3d4d675d7cfc82234c20d6 (diff)
Merged changes with conversion-linear
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs16
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
390conjV :: (Storable a, RealFloat a) => Vector (Complex a) -> Vector (Complex a)
391conjV = mapVector conjugate
392
393-- | creates a complex vector from vectors with real and imaginary parts
394toComplexV :: (RealFloat a, Element a) => (Vector a, Vector a) -> Vector (Complex a)
395toComplexV (r,i) = asComplex $ flatten $ fromColumns [r,i]
396
397-- | the inverse of 'toComplex'
398fromComplexV :: (RealFloat a, Element a) => Vector (Complex a) -> (Vector a, Vector a)
399fromComplexV 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.
405saveMatrix :: FilePath 389saveMatrix :: FilePath
406 -> String -- ^ format (%f, %g, %e) 390 -> String -- ^ format (%f, %g, %e)