phonetic-languages-filters-array 0.3.0.0 → 0.4.0.0
raw patch · 4 files changed
+14/−12 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- LICENSE +1/−1
- Phonetic/Languages/Filters.hs +5/−9
- phonetic-languages-filters-array.cabal +2/−2
CHANGELOG.md view
@@ -12,3 +12,9 @@ ## 0.3.0.0 -- 2021-10-31 * Third version. Switched back to the CaseBi.Arr.getBFstLSorted' function.++## 0.4.0.0 -- 2022-04-25++* Fourth version. Fixed issue with incorrectly defined functions unsafeRearrangeIGV and unsafeSwapIWithMaxI+that influence almost all the module functionality. This means that all the results obtained earlier with these+functions or that ones that use them must be checked and fixed.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020 OleksandrZhabenko+Copyright (c) 2020-2022 OleksandrZhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Phonetic/Languages/Filters.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Phonetic.Languages.Filters--- Copyright : (c) OleksandrZhabenko 2020-2021+-- Copyright : (c) OleksandrZhabenko 2020-2022 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -26,6 +26,7 @@ import Data.Filters.Basic import GHC.Arr import CaseBi.Arr+import Data.Monoid (mappend) -- | Makes a complex interval-based transformation moving the value from its own interval to the corresponding by the list of tuples second element of the -- respective pair with the first element being the starting number of the interval (numeration of them begins at 1). The list argument must be sorted@@ -51,10 +52,10 @@ :: (RealFrac b, Integral c) => b -> b -> c- -> [c]+ -> [c] -- ^ Must be not empty though this is not checked -> b -> b-unsafeRearrangeIGV minE maxE n xs = unsafeRearrangeIG minE maxE n . zip [1..n] $ xs+unsafeRearrangeIGV minE maxE n xs = unsafeRearrangeIG minE maxE n (zip xs (cycle [n]) `mappend` [(n,head xs)]) {-# INLINE unsafeRearrangeIGV #-} -- | Swaps the k-th inner interval values with the maximum one's (that is the n-th one) values.@@ -65,12 +66,7 @@ -> c -- ^ It is expected to be less than the previous argument, but greater than 0, though this is not checked. -> b -- ^ It is expected to lie between the first two arguments, though this is not checked. -> b-unsafeSwapIWithMaxI minE maxE n k = unsafeRearrangeIGV minE maxE n . map (f k n) $ [0..n - 1]- where f k n x- | x == k - 1 = n - 1- | x == n - 1 = k - 1- | otherwise = x- {-# INLINE f #-}+unsafeSwapIWithMaxI minE maxE n k = unsafeRearrangeIG minE maxE n [(k,n),(n,k)] {-# INLINE unsafeSwapIWithMaxI #-} -- | Swaps the inner intervals values (given by the list of elements of the data type that has an instance of the
phonetic-languages-filters-array.cabal view
@@ -2,9 +2,9 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-filters-array-version: 0.3.0.0+version: 0.4.0.0 synopsis: Allows to change the structure of the function output.-description: Allows to change the structure of the function output for the data types that have instances of the RealFrac class. Is rewritten from the predecessor uniqueness-periods-vector-filters package. Since the 0.2.0.0 version uses hashtables (because of using Case.Hashable.Cuckoo.getBFstL' function).+description: Allows to change the structure of the function output for the data types that have instances of the RealFrac class. Is rewritten from the predecessor uniqueness-periods-vector-filters package. homepage: https://hackage.haskell.org/package/phonetic-languages-filters-array license: MIT license-file: LICENSE