summaryrefslogtreecommitdiff
path: root/sampling.cabal
blob: d7590a2e413dbf0e0382641a2fe76660149faaad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name:                sampling
version:             0.3.5
synopsis:            Sample values from collections.
homepage:            https://github.com/jtobin/sampling
license:             MIT
license-file:        LICENSE
author:              Jared Tobin
maintainer:          jared@jtobin.ca
category:            Math
build-type:          Simple
tested-with:         GHC == 8.2.2, GHC == 8.8.3
cabal-version:       >=1.10
description:
  Basic sampling tools.
  .
  Exports variations on two simple functions for sampling from arbitrary
  'Foldable' collections:
  .
  * 'sample', for sampling without replacement
  .
  * 'resample', for sampling with replacement (i.e., a bootstrap)
  .
  Each variation can be prefixed with 'p' to sample from a container of values
  weighted by probability.

Source-repository head
  Type:     git
  Location: http://github.com/jtobin/sampling.git

library
  default-language:    Haskell2010
  hs-source-dirs:      lib
  ghc-options:
    -Wall
  other-modules:
      Numeric.Sampling.Internal
  exposed-modules:
      Numeric.Sampling
  build-depends:
      base        >  4.8  && < 6
    , containers  >= 0.5  && < 1
    , foldl       >= 1.1  && < 2
    , mwc-random  >= 0.13 && < 0.16
    , primitive   >= 0.6  && < 1
    , vector      >= 0.11 && < 1

Test-suite resample
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  Main-is:             Main.hs
  default-language:    Haskell2010
  build-depends:
      base
    , sampling

benchmark bench-sampling
  type: exitcode-stdio-1.0
  hs-source-dirs:    bench
  Main-is:           Main.hs
  default-language:  Haskell2010
  ghc-options:
    -Wall -O2
  build-depends:
      base
    , criterion
    , sampling