packages feed

hsignal 0.2.4.3 → 0.2.5

raw patch · 8 files changed

+39/−34 lines, 8 filesdep +hmatrix-gsldep ~hmatrixdep ~hmatrix-gsl-statsdep ~hstatisticsPVP ok

version bump matches the API change (PVP)

Dependencies added: hmatrix-gsl

Dependency ranges changed: hmatrix, hmatrix-gsl-stats, hstatistics

API changes (from Hackage documentation)

Files

CHANGES view
@@ -118,3 +118,6 @@  0.2.4.3: 		removed reference to '-fvector' in .cabal++0.2.5:+		added hmatrix-gsl dependency for new hmatrix 0.16
Config.hs view
@@ -42,16 +42,16 @@ testprog bInfo buildInfo libs fmks =     "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){zgesvd_(); gsl_sf_gamma(5);}\""                      ++" > " ++ (buildDir bInfo) ++ "/dummy.c; gcc "-                     ++ (join $ ccOptions buildInfo) ++ " "-                     ++ (join $ cppOptions buildInfo) ++ " "-                     ++ (join $ map ("-I"++) $ includeDirs buildInfo) ++ " " +                     ++ (join_ $ ccOptions buildInfo) ++ " "+                     ++ (join_ $ cppOptions buildInfo) ++ " "+                     ++ (join_ $ map ("-I"++) $ includeDirs buildInfo) ++ " "                       ++ (buildDir bInfo) ++ "/dummy.c -o "                      ++ (buildDir bInfo) ++ "/dummy "-                     ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " "+                     ++ (join_ $ map ("-L"++) $ extraLibDirs buildInfo) ++ " "                      ++ (prepend "-l" $ libs) ++ " "                      ++ (prepend "-framework " fmks) ++ " > /dev/null 2> /dev/null" -join = intercalate " "+join_ = intercalate " " prepend x = unwords . map (x++) . words  check bInfo buildInfo libs fmks = (ExitSuccess ==) `fmap` system (testprog bInfo buildInfo libs fmks)@@ -59,12 +59,12 @@ -- simple test for GSL gsl bInfo buildInfo = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""            ++" > " ++ (buildDir bInfo) ++ "/dummy.c; gcc "-           ++ (join $ ccOptions buildInfo) ++ " "-           ++ (join $ cppOptions buildInfo) ++ " "-           ++ (join $ map ("-I"++) $ includeDirs buildInfo) ++ " " +           ++ (join_ $ ccOptions buildInfo) ++ " "+           ++ (join_ $ cppOptions buildInfo) ++ " "+           ++ (join_ $ map ("-I"++) $ includeDirs buildInfo) ++ " "             ++ (buildDir bInfo) ++ "/dummy.c -o "            ++ (buildDir bInfo) ++ "/dummy "-           ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"+           ++ (join_ $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"            ++ " > /dev/null 2> /dev/null"  -- test for gsl >= 1.12@@ -72,11 +72,11 @@     "echo \"#include <gsl/gsl_sf_exp.h>\nint main(){gsl_sf_exprel_n_CF_e(1,1,0);}\""            ++" > " ++ (buildDir bInfo) ++ "/dummy.c; gcc "             ++ (buildDir bInfo) ++ "/dummy.c "-           ++ (join $ ccOptions buildInfo) ++ " "-           ++ (join $ cppOptions buildInfo) ++ " "-           ++ (join $ map ("-I"++) $ includeDirs buildInfo)+           ++ (join_ $ ccOptions buildInfo) ++ " "+           ++ (join_ $ cppOptions buildInfo) ++ " "+           ++ (join_ $ map ("-I"++) $ includeDirs buildInfo)            ++" -o " ++ (buildDir bInfo) ++ "/dummy "-           ++ (join $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"+           ++ (join_ $ map ("-L"++) $ extraLibDirs buildInfo) ++ " -lgsl -lgslcblas"            ++ " > /dev/null 2> /dev/null"  
hsignal.cabal view
@@ -1,8 +1,8 @@ Name:               hsignal-Version:            0.2.4.3+Version:            0.2.5 License:            BSD3 License-file:       LICENSE-Copyright:          (c) A.V.H. McPhail 2010, 2011+Copyright:          (c) A.V.H. McPhail 2010, 2011, 2014 Author:             Vivian McPhail Maintainer:         haskell.vivian.mcphail <at> gmail <dot> com Stability:          provisional@@ -17,7 +17,7 @@      .      Feature requests, suggestions, and bug fixes welcome. Category:           Math-tested-with:        GHC ==7.4.1+tested-with:        GHC ==7.8.1  cabal-version:      >=1.8 @@ -36,9 +36,10 @@                         mtl > 2,                          array,                         bytestring, storable-complex, binary,-                        hmatrix >= 0.10.0.4,-                        hmatrix-gsl-stats >= 0.1.2.10,-                        hstatistics >= 0.2.2.10+                        hmatrix >= 0.16.0.3,+                        hmatrix-gsl >= 0.16,+                        hmatrix-gsl-stats >= 0.2,+                        hstatistics >= 0.2.5.1      Extensions:         ForeignFunctionInterface @@ -57,6 +58,7 @@     ghc-options:        -Wall -fno-warn-missing-signatures                               -fno-warn-orphans                               -fno-warn-unused-binds+      if flag(mkl)       if arch(x86_64)
lib/Numeric/Signal.hs view
@@ -121,8 +121,8 @@ standard_fir :: (S.Filterable a, Double ~ DoubleOf a, Container Vector (Complex a), Convert (Complex a)) =>                 Int -> [(a,a)] -> Vector a standard_fir o be = let grid  = calc_grid o-                        trans = grid `div` 16-                    in fir o be grid trans $ S.hamming_ (o+1)+                        trans_ = grid `div` 16+                    in fir o be grid trans_ $ S.hamming_ (o+1)  calc_grid :: Int -> Int calc_grid o = let next_power = ceiling (((log $ fromIntegral o) :: Double) / (log 2.0)) :: Int
lib/Numeric/Signal/EEG/BDF.hs view
@@ -192,10 +192,10 @@                    -- let v = rotate d
                    -- lift $ putStrLn $ "vectors: " ++ (show $ length v)
                    -- lift $ putStrLn $ "slices: " ++ (show $ length $ head v)
-                   return $! map join $! rotate d
-    where rotate []            = []
-          rotate xs@((_:[]):_) = [concat xs]
-          rotate ((x:xs):xss)  = (x : (map head xss)) : (rotate (xs : (map tail xss)))
+                   return $! map join $! rotate_ d
+    where rotate_ []            = []
+          rotate_ xs@((_:[]):_) = [concat xs]
+          rotate_ ((x:xs):xss)  = (x : (map head xss)) : (rotate_ (xs : (map tail xss)))
  
 {-
 readData _ 0     _  = error "readData, zeroth record requested"
lib/Numeric/Signal/Internal.hs view
@@ -31,7 +31,7 @@ --import Numeric.LinearAlgebra.Linear  import qualified Numeric.GSL.Fourier as F-import Foreign hiding (unsafePerformIO)+import Foreign  --import Data.Complex import Foreign.C.Types
lib/Numeric/Signal/Multichannel.hs view
@@ -160,7 +160,7 @@                               put l                               put de                               put f-                              put $! fmap ((\(r,i) -> (convert r, convert i)) . fromComplex) d+                              put $! fmap ((\(r,j) -> (convert r, convert j)) . fromComplex) d         where convert v = let (mi,ma) = (minElement v,maxElement v)                               v' = mapVector (\x -> round $ (x - mi)/(ma - mi) * (fromIntegral (maxBound :: Word64))) v                           in (mi,ma,v' :: Vector Word64) @@ -173,7 +173,7 @@           de <- get           f <- get           (d :: I.Array Int ((Double,Double,Vector Word64),(Double,Double,Vector Word64))) <- get-          return $! (MC s p c l de f (seq d (fmap (\(r,i) -> toComplex (convert r,convert i)) d)))+          return $! (MC s p c l de f (seq d (fmap (\(r,j) -> toComplex (convert r,convert j)) d)))               where convert (mi,ma,v) = mapVector (\x -> ((fromIntegral x)) / (fromIntegral (maxBound :: Word64)) * (ma - mi) + mi) v  @@ -186,7 +186,7 @@                               put l                               put de                               put f-                              put $! fmap ((\(r,i) -> (convert r, convert i)) . fromComplex) d+                              put $! fmap ((\(r,j) -> (convert r, convert j)) . fromComplex) d         where convert v = let (mi,ma) = (minElement v,maxElement v)                               v' = mapVector (\x -> round $ (x - mi)/(ma - mi) * (fromIntegral (maxBound :: Word32))) v                           in (mi,ma,v' :: Vector Word32) @@ -199,7 +199,7 @@           de <- get           f <- get           (d :: I.Array Int ((Float,Float,Vector Word32),(Float,Float,Vector Word32))) <- get-          return $! (MC s p c l de f (seq d (fmap (\(r,i) -> toComplex (convert r,convert i)) d)))+          return $! (MC s p c l de f (seq d (fmap (\(r,j) -> toComplex (convert r,convert j)) d)))               where convert (mi,ma,v) = mapVector (\x -> ((fromIntegral x)) / (fromIntegral (maxBound :: Word32)) * (ma - mi) + mi) v  @@ -353,11 +353,11 @@                             c = _channels m                             b = ((1,1),(c,c))                             r = I.range b-                            diff = I.listArray b (map (\i@(x,y) -> (i,if x <= y then Just (double $ (d I.! y)-(d I.! x)) else Nothing)) r) :: I.Array (Int,Int) ((Int,Int),Maybe (Vector Double))+                            diff = I.listArray b (map (\j@(x,y) -> (j,if x <= y then Just (double $ (d I.! y)-(d I.! x)) else Nothing)) r) :: I.Array (Int,Int) ((Int,Int),Maybe (Vector Double))                             h = mapArrayConcurrently (maybe Nothing (\di -> Just $ H.fromLimits 128 ((-2)*pi,2*pi) di)) (fmap snd diff)-                            ent = mapArrayConcurrently (\(i,difvec) -> case difvec of +                            ent = mapArrayConcurrently (\(j,difvec) -> case difvec of                                                          Nothing -> 0 :: Double-                                                        Just da -> SI.entropy (fromJust (h I.! i)) da) diff+                                                        Just da -> SI.entropy (fromJust (h I.! j)) da) diff                         in fromArray2D ent  -----------------------------------------------------------------------------
lib/Numeric/Signal/Noise.hs view
@@ -47,7 +47,7 @@   import Numeric.Container-import Numeric.LinearAlgebra+import Numeric.LinearAlgebra()  import qualified Numeric.GSL.Fourier as F