packages feed

probability-polynomial-1.0.0.1: probability-polynomial.cabal

cabal-version:   3.0
name:            probability-polynomial

-- Package Versioning Policy: https://pvp.haskell.org
-- PVP summary:    +-+------- breaking API changes
--                 | | +----- non-breaking API additions
--                 | | | +--- code changes with no API change
version:         1.0.0.1
synopsis:        Probability distributions via piecewise polynomials
description:
  Package for manipulating finite probability distributions.

  Both discrete, continuous and mixed probability distributions are supported.
  Continuous probability distributions are represented
  in terms of piecewise polynomials.

  Also includes an implementation of polynomials in one variable.

category:        Probability, Math, Numeric, DeltaQ
homepage:        https://github.com/DeltaQ-SD/deltaq
license:         BSD-3-Clause
license-file:    LICENSE
copyright:       Predictable Network Solutions Ltd., 2020-2024
author:          Peter W. Thompson, Heinrich Apfelmus
maintainer:      peter.thompson@pnsol.com

extra-doc-files:
  CHANGELOG.md
  README.md

tested-with:
  , GHC == 9.10.1
  , GHC == 9.6.6
  , GHC == 8.10.7

common warnings
  ghc-options: -Wall

source-repository head
  type:     git
  location: git://github.com/DeltaQ-SD/deltaq.git
  subdir:   lib/probability-polynomial

library
  import:           warnings
  hs-source-dirs:   src
  default-language: Haskell2010

  build-depends:
    , base >= 4.14.3.0 && < 5
    , containers >= 0.6 && < 0.8
    , deepseq >= 1.4.4.0 && < 1.6
    , exact-combinatorics >= 0.2 && < 0.3

  exposed-modules:
    Data.Function.Class
    Numeric.Function.Piecewise
    Numeric.Measure.Discrete
    Numeric.Measure.Finite.Mixed
    Numeric.Measure.Probability
    Numeric.Polynomial.Simple
    Numeric.Probability.Moments

test-suite test
  import:           warnings
  type:             exitcode-stdio-1.0
  hs-source-dirs:   test
  default-language: Haskell2010

  build-tool-depends: hspec-discover:hspec-discover
    
  build-depends:
    , base
    , containers
    , probability-polynomial
    , hspec >= 2.11.0 && < 2.12
    , QuickCheck >= 2.14 && < 2.16
  
  main-is:
    Spec.hs
  
  other-modules:
    Numeric.Function.PiecewiseSpec
    Numeric.Measure.DiscreteSpec
    Numeric.Measure.Finite.MixedSpec
    Numeric.Measure.ProbabilitySpec
    Numeric.Polynomial.SimpleSpec

benchmark probability-polynomial-benchmark
  import:           warnings
  type:             exitcode-stdio-1.0
  hs-source-dirs:   benchmark
  default-language: Haskell2010
  main-is:          Main.hs

  build-depends:
    , base
    , probability-polynomial
    , criterion >= 1.6 && < 1.7
    , deepseq