quantizer 0.2.1.1 → 0.3.0.0
raw patch · 6 files changed
+15/−10 lines, 6 files
Files
- CHANGELOG.md +5/−0
- FoldableQuantizer.hs +2/−2
- LICENSE +1/−1
- ListQuantizer.hs +2/−2
- TwoQuantizer.hs +4/−4
- quantizer.cabal +1/−1
CHANGELOG.md view
@@ -18,3 +18,8 @@ * Second version revised B. Some documentation improvements. +## 0.3.0.0 -- 2023-04-18++* Third version. Added README.md file. Removed the unneeded constraint for mean2F and related +functions. Since the version 0.3.0.0, the project is devoted to fondation Gastrostars.+
FoldableQuantizer.hs view
@@ -47,7 +47,7 @@ u = fromJust . S.safeHeadG $ us foldableQuantizerG - :: (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. The ambigous situation is defined by the second argument.+ :: (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. -> (t1 a -> a -> Ordering) -> t1 a -> t2 a@@ -77,7 +77,7 @@ u = S.safeHeadG us foldableQuantizerGM - :: (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. The ambigous situation is defined by the second argument.+ :: (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. -> (t1 a -> a -> m Ordering) -> t1 a -> t2 a
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2022 Oleksandr Zhabenko+Copyright (c) 2022-2023 Oleksandr Zhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
ListQuantizer.hs view
@@ -45,7 +45,7 @@ u = head us foldableQuantizerGL - :: (Ord a, Floating a, Integral 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, Floating 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. -> ([a] -> a -> Ordering) -> [a] -> [a]@@ -75,7 +75,7 @@ u = if null us then Nothing else Just . head $ us foldableQuantizerGML - :: (Ord a, Floating a, Integral a, Monad m) => 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) => 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. -> ([a] -> a -> m Ordering) -> [a] -> [a]
TwoQuantizer.hs view
@@ -88,7 +88,7 @@ y0 = last ks twoQuantizerG - :: (Ord a, Floating a, Integral 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, Floating 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. -> (a -> a -> a -> Ordering) -> [a] -> [a] @@ -131,15 +131,15 @@ -- | Simple arithmetic mean. Is vulnerable to floating point rounding error so if possible use just -- for double-precision values. meanF2 - :: (Floating a, Integral a) => [a] + :: (Floating a) => [a] -> a -> a -> a meanF2 (t:ts) s l = meanF2 ts (s + t) (l + 1) -meanF2 _ s l = s / fromIntegral l+meanF2 _ s l = s / l twoQuantizerGM - :: (Ord a, Floating a, Integral a, Monad m) => 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) => 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. -> (a -> a -> a -> m Ordering) -> [a] -> [a]
quantizer.cabal view
@@ -1,5 +1,5 @@ name: quantizer-version: 0.2.1.1+version: 0.3.0.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