From 97e8a48be58fd53afccc7ae01ee6ec5805d5c1cd Mon Sep 17 00:00:00 2001 From: Vivian McPhail Date: Thu, 8 Jul 2010 23:03:48 +0000 Subject: Linear and Floating (Complex Float) --- lib/Data/Packed/Internal/Matrix.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/Data/Packed/Internal/Matrix.hs') 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 transdata = transdataAux ctransR constantD = constantAux cconstantR +instance Element (Complex Float) where + transdata = transdataAux ctransQ + constantD = constantAux cconstantQ + instance Element (Complex Double) where transdata = transdataAux ctransC constantD = constantAux cconstantC @@ -314,6 +318,7 @@ transdataAux fun c1 d c2 = foreign import ccall "transF" ctransF :: TFMFM foreign import ccall "transR" ctransR :: TMM +foreign import ccall "transQ" ctransQ :: TQMQM foreign import ccall "transC" ctransC :: TCMCM ---------------------------------------------------------------------- @@ -342,9 +347,14 @@ constantR :: Double -> Int -> Vector Double constantR = constantAux cconstantR foreign import ccall "constantR" cconstantR :: Ptr Double -> TV +constantQ :: Complex Float -> Int -> Vector (Complex Float) +constantQ = constantAux cconstantQ +foreign import ccall "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV + constantC :: Complex Double -> Int -> Vector (Complex Double) constantC = constantAux cconstantC foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV + ---------------------------------------------------------------------- -- | Extracts a submatrix from a matrix. -- cgit v1.2.3