diff options
author | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-08 23:03:48 +0000 |
---|---|---|
committer | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-08 23:03:48 +0000 |
commit | 97e8a48be58fd53afccc7ae01ee6ec5805d5c1cd (patch) | |
tree | 837f4a6b21e0317da834c8ac42c8adfce9a22d24 /lib/Data/Packed/Internal/Matrix.hs | |
parent | b8699c4f1acff1e3f31cdbac1a7a4a8864b1eeba (diff) |
Linear and Floating (Complex Float)
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 10 |
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 | ||
268 | instance Element (Complex Float) where | ||
269 | transdata = transdataAux ctransQ | ||
270 | constantD = constantAux cconstantQ | ||
271 | |||
268 | instance Element (Complex Double) where | 272 | instance 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 | ||
315 | foreign import ccall "transF" ctransF :: TFMFM | 319 | foreign import ccall "transF" ctransF :: TFMFM |
316 | foreign import ccall "transR" ctransR :: TMM | 320 | foreign import ccall "transR" ctransR :: TMM |
321 | foreign import ccall "transQ" ctransQ :: TQMQM | ||
317 | foreign import ccall "transC" ctransC :: TCMCM | 322 | foreign import ccall "transC" ctransC :: TCMCM |
318 | ---------------------------------------------------------------------- | 323 | ---------------------------------------------------------------------- |
319 | 324 | ||
@@ -342,9 +347,14 @@ constantR :: Double -> Int -> Vector Double | |||
342 | constantR = constantAux cconstantR | 347 | constantR = constantAux cconstantR |
343 | foreign import ccall "constantR" cconstantR :: Ptr Double -> TV | 348 | foreign import ccall "constantR" cconstantR :: Ptr Double -> TV |
344 | 349 | ||
350 | constantQ :: Complex Float -> Int -> Vector (Complex Float) | ||
351 | constantQ = constantAux cconstantQ | ||
352 | foreign import ccall "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV | ||
353 | |||
345 | constantC :: Complex Double -> Int -> Vector (Complex Double) | 354 | constantC :: Complex Double -> Int -> Vector (Complex Double) |
346 | constantC = constantAux cconstantC | 355 | constantC = constantAux cconstantC |
347 | foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV | 356 | foreign 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. |