packages feed

quantizer 0.3.0.2 → 0.3.1.0

raw patch · 5 files changed

+40/−24 lines, 5 filesdep +minmaxdep +monoid-insertleftdep −subG

Dependencies added: minmax, monoid-insertleft

Dependencies removed: subG

Files

CHANGELOG.md view
@@ -31,3 +31,7 @@  * Third version revised B. Improved the quality of the documentation in the README.md file. +## 0.3.1.0 -- 2024-04-07++* Third version revised C. Switched to more lightweight dependencies of minmax and monoid-insertleft.  Added Git repository with bug-tracking.+
FoldableQuantizer.hs view
@@ -1,6 +1,6 @@ -- | -- Module      :  FoldableQuantizer--- Copyright   :  (c) OleksandrZhabenko 2022-2023+-- Copyright   :  (c) OleksandrZhabenko 2022-2024 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  oleksandr.zhabenko@yahoo.com@@ -25,11 +25,11 @@ import Data.Maybe import qualified Data.Foldable as F import qualified TwoQuantizer as Q (meanF2)-import Data.MinMax (minMax11)-import qualified Data.SubG as S+import Data.MinMax1 (minMax11)+import qualified Data.InsertLeft as IL  round2G - :: (Ord a, S.InsertLeft t a, Monoid (t a)) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. The ambigous situation is defined by the second argument.+ :: (Ord a, IL.InsertLeft t a, Monoid (t a)) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. The ambigous situation is defined by the second argument.  -> (t a -> a -> Ordering)   -> t a   -> a @@ -42,12 +42,12 @@  | F.null us = Just t  | otherwise = Just (case f xs z of { GT -> u; LT -> t; EQ -> if bool then u else t })    where (x, y) = fromJust . minMax11 $ xs-         (ts,us) = S.span (<z) xs-         t = fromJust . S.safeLastG $ ts -- This can cause some perfarmance downgrade because of the general implementation being not optimized.-         u = fromJust . S.safeHeadG $ us+         (ts,us) = IL.span (<z) xs+         t = fromJust . IL.safeLastG $ ts -- This can cause some perfarmance downgrade because of the general implementation being not optimized.+         u = fromJust . IL.safeHeadG $ us  foldableQuantizerG - :: (Ord a, Floating 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. The ambigous situation is defined by the second argument.+ :: (Ord a, Floating a, IL.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. The ambigous situation is defined by the second argument.  -> (t1 a -> a -> Ordering)   -> t1 a   -> t2 a@@ -57,7 +57,7 @@         ys = F.foldr (\t ts -> t * k : ts) [] xs  round2GM - :: (Ord a, Monad m, S.InsertLeft t1 a, Monoid (t1 a)) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. The ambigous situation is defined by the second argument.+ :: (Ord a, Monad m, IL.InsertLeft t1 a, Monoid (t1 a)) => Bool -- ^ If 'True' then the function rounds the result in the ambiguous situation to the greater value. The ambigous situation is defined by the second argument.  -> (t1 a -> a -> m Ordering)   -> t1 a   -> a @@ -72,12 +72,12 @@      q <- f xs z      case q of { GT -> return u; LT -> return t; EQ -> return (if bool then u else t)}    where (x, y) = fromJust . minMax11 $ xs-         (ts,us) = S.span (<z) xs-         t = S.safeLastG ts --  This can cause some perfarmance downgrade because of the general implementation being not optimized.-         u = S.safeHeadG us+         (ts,us) = IL.span (<z) xs+         t = IL.safeLastG ts --  This can cause some perfarmance downgrade because of the general implementation being not optimized.+         u = IL.safeHeadG us  foldableQuantizerGM - :: (Ord a, Floating 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. The ambigous situation is defined by the second argument.+ :: (Ord a, Floating a, Monad m, IL.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. The ambigous situation is defined by the second argument.  -> (t1 a -> a -> m Ordering)   -> t1 a   -> t2 a 
ListQuantizer.hs view
@@ -1,6 +1,6 @@ -- | -- Module      :  ListQuantizer--- Copyright   :  (c) OleksandrZhabenko 2023+-- Copyright   :  (c) OleksandrZhabenko 2023-2024 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  oleksandr.zhabenko@yahoo.com@@ -23,7 +23,7 @@ import GHC.Num import Data.Maybe import qualified TwoQuantizer as Q (meanF2)-import Data.MinMax (minMax11)+import Data.MinMax1 (minMax11)  -- | A better suited variant for 'FoldableQuantizer.round2G' for lists.  round2GL
README.md view
@@ -2,15 +2,26 @@ Uses some rounding techniques and recaps about quantum states superposition  (therefore, the package's name). -Devotion-========+ Devotion+ ======== -Author would like to devote this project to support the [Foundation-Gastrostars](https://gastrostars.nl).-On the 19/04/2023 there is the foundation founder's (that is [Emma Kok](https://emmakok.nl)) -namesday, the memory of St. Emma of Lesum or Emma of Stiepel (also known as Hemma and Imma).-If you would like to share some financial support, please, contact the foundation+The author would like to devote this project to support the [Foundation Gastrostars](https://gastrostars.nl).++On the 21/02/2024 there is an International Mother Tongue Day — that is Ukrainian for the author of the package. ++On the 12/03/2024 there was a Birthday of Emma Kok, she turned 16. Therefore, the release 0.3.1.0 is dedicated i.e. tributed to her.++Besides, you can support Ukrainian people in various forms.++All support is welcome, including donations for the needs of the Ukrainian army, IDPs and refugees. ++If you would like to share some financial support with the Foundation Gastrostars, please, contact the mentioned foundation using the URL:  [Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren)+ 
quantizer.cabal view
@@ -1,8 +1,9 @@ name:                quantizer-version:             0.3.0.2+version:             0.3.1.0 synopsis:            Library to provide the behaviour similar to quantum states superposition.  description:         Has three 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+bug-reports:         https://github.com/Oleksandr-Zhabenko/quantizer/issues license:             MIT license-file:        LICENSE author:              OleksandrZhabenko@@ -17,6 +18,6 @@   exposed-modules:     TwoQuantizer, ListQuantizer, FoldableQuantizer   -- other-modules:   -- other-extensions: -  build-depends:       base >=4.13 && <5, subG == 0.6.1.0, uniqueness-periods-vector-stats == 0.4.0.0+  build-depends:       base >=4.13 && <5, minmax == 0.1.1.0, monoid-insertleft ==0.1.0.1, uniqueness-periods-vector-stats == 0.4.0.0   -- hs-source-dirs:   default-language:    Haskell2010