quantizer 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+41/−5 lines, 3 filesdep ~basedep ~subGdep ~uniqueness-periods-vector-statsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, subG, uniqueness-periods-vector-stats
API changes (from Hackage documentation)
Files
- FoldableQuantizer.hs +20/−2
- TwoQuantizer.hs +18/−0
- quantizer.cabal +3/−3
FoldableQuantizer.hs view
@@ -1,5 +1,23 @@+-- |+-- Module : FoldableQuantizer+-- Copyright : (c) OleksandrZhabenko 2022-2023+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- A module to provide the extended variants to convert a 'S.InsertLeft' instance structure with+-- some values to another one with the values from the pre-defined structure. Similar to +-- the measurement of the quantum state observables with the discrete spectrum.++{-# LANGUAGE NoImplicitPrelude #-}+ module FoldableQuantizer where +import GHC.Base+import GHC.List+import GHC.Real+import GHC.Float+import GHC.Num import Data.Maybe import qualified Data.Foldable as F import qualified TwoQuantizer as Q (meanF2)@@ -25,7 +43,7 @@ u = fromJust . S.safeHeadG $ us foldableQuantizerG - :: (Ord a, Floating a, Integral a, S.InsertLeft t1 a, Monoid (t1 a), Foldable t2) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value.+ :: (Ord a, Floating a, Integral a, S.InsertLeft t1 a, Monoid (t1 a), F.Foldable t2) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. -> (t1 a -> a -> Ordering) -> t1 a -> t2 a@@ -55,7 +73,7 @@ u = S.safeHeadG us foldableQuantizerGM - :: (Ord a, Floating a, Integral a, Monad m, S.InsertLeft t1 a, Monoid (t1 a), Foldable t2) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. + :: (Ord a, Floating a, Integral a, Monad m, S.InsertLeft t1 a, Monoid (t1 a), F.Foldable t2) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. -> (t1 a -> a -> m Ordering) -> t1 a -> t2 a
TwoQuantizer.hs view
@@ -1,7 +1,25 @@+-- |+-- Module : TwoQuantizer+-- Copyright : (c) OleksandrZhabenko 2022-2023+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- A module to provide the simple version of the obtaining from the list of values the list of other+-- values, the pre-defined ones. Provides both pure functions and monadic versions.++{-# LANGUAGE NoImplicitPrelude #-}+ module TwoQuantizer where +import GHC.Base+import GHC.Num import Data.Maybe import Numeric.Stats (meanD)+import GHC.Float+import GHC.Real+import GHC.List+ round2 :: Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value.
quantizer.cabal view
@@ -1,12 +1,12 @@ name: quantizer-version: 0.1.0.0+version: 0.2.0.0 synopsis: Library to provide the behaviour similar to quantum states superposition. description: Has two modules with similar functionality. The functions provide the somewhat generalized way to round the numbers based on some data. homepage: https://hackage.haskell.org/package/quantizer license: MIT license-file: LICENSE author: OleksandrZhabenko-maintainer: olexandr543@yahoo.com+maintainer: oleksandr.zhabenko@yahoo.com copyright: Oleksandr Zhabenko category: Math build-type: Simple@@ -17,6 +17,6 @@ exposed-modules: TwoQuantizer, FoldableQuantizer -- other-modules: -- other-extensions: - build-depends: base >=4.8 && <5, subG == 0.5.3.0, uniqueness-periods-vector-stats == 0.3.0.0+ build-depends: base >=4.13 && <5, subG == 0.6.0.0, uniqueness-periods-vector-stats == 0.4.0.0 -- hs-source-dirs: default-language: Haskell2010