summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal/Matrix.hs
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-08 23:03:48 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-08 23:03:48 +0000
commit97e8a48be58fd53afccc7ae01ee6ec5805d5c1cd (patch)
tree837f4a6b21e0317da834c8ac42c8adfce9a22d24 /lib/Data/Packed/Internal/Matrix.hs
parentb8699c4f1acff1e3f31cdbac1a7a4a8864b1eeba (diff)
Linear and Floating (Complex Float)
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 7b3b305..861c72a 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -265,6 +265,10 @@ instance Element Double where
265 transdata = transdataAux ctransR 265 transdata = transdataAux ctransR
266 constantD = constantAux cconstantR 266 constantD = constantAux cconstantR
267 267
268instance Element (Complex Float) where
269 transdata = transdataAux ctransQ
270 constantD = constantAux cconstantQ
271
268instance Element (Complex Double) where 272instance Element (Complex Double) where
269 transdata = transdataAux ctransC 273 transdata = transdataAux ctransC
270 constantD = constantAux cconstantC 274 constantD = constantAux cconstantC
@@ -314,6 +318,7 @@ transdataAux fun c1 d c2 =
314 318
315foreign import ccall "transF" ctransF :: TFMFM 319foreign import ccall "transF" ctransF :: TFMFM
316foreign import ccall "transR" ctransR :: TMM 320foreign import ccall "transR" ctransR :: TMM
321foreign import ccall "transQ" ctransQ :: TQMQM
317foreign import ccall "transC" ctransC :: TCMCM 322foreign import ccall "transC" ctransC :: TCMCM
318---------------------------------------------------------------------- 323----------------------------------------------------------------------
319 324
@@ -342,9 +347,14 @@ constantR :: Double -> Int -> Vector Double
342constantR = constantAux cconstantR 347constantR = constantAux cconstantR
343foreign import ccall "constantR" cconstantR :: Ptr Double -> TV 348foreign import ccall "constantR" cconstantR :: Ptr Double -> TV
344 349
350constantQ :: Complex Float -> Int -> Vector (Complex Float)
351constantQ = constantAux cconstantQ
352foreign import ccall "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV
353
345constantC :: Complex Double -> Int -> Vector (Complex Double) 354constantC :: Complex Double -> Int -> Vector (Complex Double)
346constantC = constantAux cconstantC 355constantC = constantAux cconstantC
347foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV 356foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV
357
348---------------------------------------------------------------------- 358----------------------------------------------------------------------
349 359
350-- | Extracts a submatrix from a matrix. 360-- | Extracts a submatrix from a matrix.