summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryanOSullivan <>2010-11-22 23:04:47 (GMT)
committerLuite Stegeman <luite@luite.com>2010-11-22 23:04:47 (GMT)
commitb7ca172a501162f94f6ff30745614dff54a761cd (patch)
tree4030afba2ae5d01b06b98ada93f5e878260e02a3
parent36f7f3e079765544d8e64785350eaf64bac2c8cc (diff)
version 0.8.0.40.8.0.4
-rw-r--r--README.markdown2
-rw-r--r--Statistics/Function.hs7
-rw-r--r--Statistics/Sample/Powers.hs2
-rw-r--r--statistics.cabal6
4 files changed, 8 insertions, 9 deletions
diff --git a/README.markdown b/README.markdown
index c11bbb2..7e17ffc 100644
--- a/README.markdown
+++ b/README.markdown
@@ -33,7 +33,7 @@ yield unacceptable performance.
# Get involved!
Please report bugs via the
-[bitbucket issue tracker](http://bitbucket.org/bos/attoparsec/statistics).
+[bitbucket issue tracker](http://bitbucket.org/bos/statistics/issues).
Master [Mercurial repository](http://bitbucket.org/bos/statistics):
diff --git a/Statistics/Function.hs b/Statistics/Function.hs
index 02a3d70..2fca6fb 100644
--- a/Statistics/Function.hs
+++ b/Statistics/Function.hs
@@ -24,15 +24,14 @@ module Statistics.Function
import Control.Exception (assert)
import Control.Monad.Primitive (PrimMonad)
-import Data.Vector.Algorithms.Combinators (apply)
-import Data.Vector.Generic (unsafeFreeze)
+import Data.Vector.Generic (modify, unsafeFreeze)
import qualified Data.Vector.Algorithms.Intro as I
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Generic.Mutable as M
-- | Sort a vector.
sort :: (Ord e, G.Vector v e) => v e -> v e
-sort = apply I.sort
+sort = modify I.sort
{-# INLINE sort #-}
-- | Partially sort a vector, such that the least /k/ elements will be
@@ -41,7 +40,7 @@ partialSort :: (G.Vector v e, Ord e) =>
Int -- ^ The number /k/ of least elements.
-> v e
-> v e
-partialSort k = apply (\a -> I.partialSort a k)
+partialSort k = modify (\a -> I.partialSort a k)
{-# INLINE partialSort #-}
-- | Return the indices of a vector.
diff --git a/Statistics/Sample/Powers.hs b/Statistics/Sample/Powers.hs
index 84c3fdf..509ade4 100644
--- a/Statistics/Sample/Powers.hs
+++ b/Statistics/Sample/Powers.hs
@@ -82,7 +82,7 @@ powers :: G.Vector v Double =>
-> Powers
powers k
| k < 2 = error "Statistics.Sample.powers: too few powers"
- | otherwise = fini . G.foldl' go (unsafePerformIO $ MU.newWith l 0)
+ | otherwise = fini . G.foldl' go (unsafePerformIO $ MU.replicate l 0)
where
go ms x = inlinePerformIO $ loop 0 1
where loop !i !xk | i == l = return ms
diff --git a/statistics.cabal b/statistics.cabal
index 3d21647..74c9d05 100644
--- a/statistics.cabal
+++ b/statistics.cabal
@@ -1,5 +1,5 @@
name: statistics
-version: 0.8.0.3
+version: 0.8.0.4
synopsis: A library of statistical types, data, and functions
description:
This library provides a number of common functions and types useful
@@ -63,8 +63,8 @@ library
mwc-random >= 0.7.0.0,
primitive >= 0.3,
time,
- vector >= 0.6.0.2,
- vector-algorithms >= 0.3.2
+ vector >= 0.7.0.0,
+ vector-algorithms >= 0.4
if impl(ghc >= 6.10)
build-depends:
base >= 4