packages feed

uniqueness-periods-vector-general 0.4.2.0 → 0.4.3.0

raw patch · 3 files changed

+14/−7 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -48,3 +48,8 @@ ## 0.4.2.0 -- 2020-09-13  * Fourth version revised B. Fixed issue with toFile function in being not written output for the complex second argument. ++## 0.4.3.0 -- 2020-09-28++* Fourth version revised C. Fixed issue with maximumElByVec function for situations with repeated distant groups of sounds (and probably other similar ones). Changed+the behaviour of the maximumElBy function so that it become strict in the inner maximum element. 
Languages/UniquenessPeriods/Vector/General/Debug.hs view
@@ -11,6 +11,8 @@ -- the old to new names are given in a file ConversionTable.txt in the main source  -- directory.  +{-# LANGUAGE BangPatterns #-}+ module Languages.UniquenessPeriods.Vector.General.Debug (   -- * Pure functions   -- ** Self-recursive pure functions and connected with them ones@@ -52,13 +54,13 @@ maximumElBy k vN y  | compare k (V.length vN) == GT = error "Languages.UniquenessPeriods.Vector.General.Debug.maximumElBy: undefined for that amount of norms. "  | compare k 0 == GT =-   let maxK = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 (k - 1)) (V.unsafeIndex vN1 (k - 1))) . snd . get22 $ y+   let !maxK = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 (k - 1)) (V.unsafeIndex vN1 (k - 1))) . snd . get22 $ y        vK = V.filter (\(_,vN2,_) -> V.unsafeIndex vN2 (k - 1) == V.unsafeIndex (secondFrom3 maxK) (k - 1)) . snd . get22 $ y in          maximumElBy (k - 1) (V.unsafeSlice 0 (k - 1) vN) (UL2 (fst . get22 $ y,vK))  | otherwise = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 0) (V.unsafeIndex vN1 0)) . snd . get22 $ y {-# INLINE maximumElBy #-} --- | Prints every 'String' from the list on the new line to the file. Uses 'appendFile' function inside. +-- | Prints every 'String' from the list on the new line to the file. Uses 'appendFile' function inside. toFile ::    FilePath -- ^ The 'FilePath' to the file to be written in the 'AppendMode' (actually appended with) the information output.   -> [String] -- ^ Each 'String' is appended on the new line to the file.@@ -180,8 +182,8 @@   -> V.Vector ([b] -> b) -- ^ 'V.Vector' of the represented as functions \"properties\" to be applied consequently.   -> UniqG2 a b -- ^ The data to be analyzed.   -> UniqG2 a b-maximumElByVec k vN x = let uniq = maximumElBy k vN x in let fsT = firstFrom3 uniq in UL2 ((\(v1,v2) -> ((fst . get22 $ x) ++ V.toList v1,v2)) . -      V.unstablePartition ((== fsT) . firstFrom3) . snd . get22 $ x)+maximumElByVec k vN x = let uniq = maximumElBy k vN x in let snD = secondFrom3 uniq in UL2 ((\(v1,v2) -> ((fst . get22 $ x) ++ V.toList v1,v2)) . +      V.unstablePartition ((== snD) . secondFrom3) . snd . get22 $ x) {-# INLINE maximumElByVec #-}    -- | A variant of the 'maximumElByVec' where all the given \"properties\" are used.
uniqueness-periods-vector-general.cabal view
@@ -2,8 +2,8 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                uniqueness-periods-vector-general-version:             0.4.2.0-synopsis:            Generalization of the functionality of the dobutokO-poetry-general-languages package+version:             0.4.3.0+synopsis:            Some kind of the optimization approach to data inner structure. description:         Generalization of the functionality of the dobutokO-poetry-general-languages package homepage:            https://hackage.haskell.org/package/uniqueness-periods-vector-general license:             MIT@@ -19,7 +19,7 @@ library   exposed-modules:     Languages.UniquenessPeriods.Vector.General.Debug   -- other-modules:-  -- other-extensions:+  other-extensions:    BangPatterns   build-depends:       base >=4.7 && <4.15, vector >=0.11 && <0.14, uniqueness-periods-vector-common >=0.3 && <1, print-info >=0.1.3 && <1   -- hs-source-dirs:   default-language:    Haskell2010