From 4b0a700c6a39d34bb85c4a1609ab0e6893b1fc5d Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 14 May 2014 21:20:41 +0200 Subject: moved map real --- packages/hmatrix/src/Numeric/GSL/Vector.hs | 29 +--------- packages/hmatrix/src/Numeric/GSL/gsl-vector.c | 82 --------------------------- 2 files changed, 2 insertions(+), 109 deletions(-) (limited to 'packages/hmatrix/src/Numeric') diff --git a/packages/hmatrix/src/Numeric/GSL/Vector.hs b/packages/hmatrix/src/Numeric/GSL/Vector.hs index 27db6ae..7197924 100644 --- a/packages/hmatrix/src/Numeric/GSL/Vector.hs +++ b/packages/hmatrix/src/Numeric/GSL/Vector.hs @@ -28,8 +28,8 @@ import Numeric.Vectorized( sumF, sumR, sumQ, sumC, prodF, prodR, prodQ, prodC, FunCodeS(..), toScalarR, toScalarF, toScalarC, toScalarQ, - FunCodeV(..), - FunCodeSV(..), + FunCodeV(..), vectorMapR, vectorMapF, + FunCodeSV(..), vectorMapValR, vectorMapValF, FunCodeVV(..) ) @@ -65,25 +65,12 @@ vectorZipAux fun code u v = unsafePerformIO $ do --------------------------------------------------------------------- - --- | map of real vectors with given function -vectorMapR :: FunCodeV -> Vector Double -> Vector Double -vectorMapR = vectorMapAux c_vectorMapR - -foreign import ccall unsafe "gsl-aux.h mapR" c_vectorMapR :: CInt -> TVV - -- | map of complex vectors with given function vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double) vectorMapC oper = vectorMapAux c_vectorMapC (fromei oper) foreign import ccall unsafe "gsl-aux.h mapC" c_vectorMapC :: CInt -> TCVCV --- | map of real vectors with given function -vectorMapF :: FunCodeV -> Vector Float -> Vector Float -vectorMapF = vectorMapAux c_vectorMapF - -foreign import ccall unsafe "gsl-aux.h mapF" c_vectorMapF :: CInt -> TFF - -- | map of real vectors with given function vectorMapQ :: FunCodeV -> Vector (Complex Float) -> Vector (Complex Float) vectorMapQ = vectorMapAux c_vectorMapQ @@ -92,24 +79,12 @@ foreign import ccall unsafe "gsl-aux.h mapQ" c_vectorMapQ :: CInt -> TQVQV ------------------------------------------------------------------- --- | map of real vectors with given function -vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double -vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromei oper) - -foreign import ccall unsafe "gsl-aux.h mapValR" c_vectorMapValR :: CInt -> Ptr Double -> TVV - -- | map of complex vectors with given function vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double) vectorMapValC = vectorMapValAux c_vectorMapValC foreign import ccall unsafe "gsl-aux.h mapValC" c_vectorMapValC :: CInt -> Ptr (Complex Double) -> TCVCV --- | map of real vectors with given function -vectorMapValF :: FunCodeSV -> Float -> Vector Float -> Vector Float -vectorMapValF oper = vectorMapValAux c_vectorMapValF (fromei oper) - -foreign import ccall unsafe "gsl-aux.h mapValF" c_vectorMapValF :: CInt -> Ptr Float -> TFF - -- | map of complex vectors with given function vectorMapValQ :: FunCodeSV -> Complex Float -> Vector (Complex Float) -> Vector (Complex Float) vectorMapValQ oper = vectorMapValAux c_vectorMapValQ (fromei oper) diff --git a/packages/hmatrix/src/Numeric/GSL/gsl-vector.c b/packages/hmatrix/src/Numeric/GSL/gsl-vector.c index 1eaf66c..99891d4 100644 --- a/packages/hmatrix/src/Numeric/GSL/gsl-vector.c +++ b/packages/hmatrix/src/Numeric/GSL/gsl-vector.c @@ -132,57 +132,6 @@ inline gsl_complex complex_signum(gsl_complex z) { #define OP(C,F) case C: { for(k=0;k