packages feed

uniqueness-periods-vector-general 0.2.2.0 → 0.2.3.0

raw patch · 3 files changed

+13/−9 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -25,3 +25,7 @@ ## 0.2.2.0 -- 2020-09-09  * Second version revised D. Changed dependency bounds of uniqueness-periods-vector-common package.++## 0.2.3.0 -- 2020-09-09++* Second version revised E. Improved code readability.
Languages/UniquenessPeriods/Vector/General/Debug.hs view
@@ -32,9 +32,9 @@  | compare k (V.length vN) == GT = error "Languages.UniquenessPeriods.Vector.General.Debug.uniqMaxPoeticalGNV: 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 . get2 $ y-       vK = V.filter (\(_,vN2,_) -> V.unsafeIndex vN2 (k - 1) == ((\(_,vNk,_) -> V.unsafeIndex vNk (k - 1)) maxK)) . snd . get2 $ y in-         if isU y then uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (V.length vN - 1) vN) (U vK)-         else uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (V.length vN - 1) vN) (UL (fromJust . fst . get2 $ y,vK))+       vK = V.filter (\(_,vN2,_) -> V.unsafeIndex vN2 (k - 1) == V.unsafeIndex (secondFrom3 maxK) (k - 1)) . snd . get2 $ y in+         if isU y then uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (k - 1) vN) (U vK)+         else uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (k - 1) vN) (UL (fromJust . fst . get2 $ y,vK))  | otherwise = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 0) (V.unsafeIndex vN1 0)) . snd . get2 $ y {-# INLINE uniqMaxPoeticalGNV #-} @@ -87,7 +87,7 @@   -> IO ([b],UniqG a b) inner1 k info vN x = do    let uniq = uniqMaxPoeticalGNV k vN x-  let fsT = (\(ys,_,_) -> ys) uniq+  let fsT = firstFrom3 uniq   printHelp info uniq   return (fsT,x) {-# INLINE inner1 #-}@@ -119,8 +119,8 @@  | compare k 0 == GT =    let vM = uniquenessVariants2GNP (get1m rr) (get2m rr) whspss vN g1 g2 xs        maxK = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 (k - 1)) (V.unsafeIndex vN1 (k - 1))) vM-       vK = V.filter (\(_,vN2,_) -> V.unsafeIndex vN2 (k - 1) == ((\(_,vNk,_) -> V.unsafeIndex vNk (k - 1)) maxK)) vM in-         uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (V.length vN - 1) vN) (U vK)+       vK = V.filter (\(_,vN2,_) -> V.unsafeIndex vN2 (k - 1) == V.unsafeIndex (secondFrom3 maxK) (k - 1)) vM in+         uniqMaxPoeticalGNV (k - 1) (V.unsafeSlice 0 (k - 1) vN) (U vK)  | otherwise = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 0) (V.unsafeIndex vN1 0)) . uniquenessVariantsGN whspss rr vN g1 g2 $ xs  -- | A variant for 'uniquenessVariants2GN' and 'uniquenessVariants2GNP' with the second argument defining, which one is used.@@ -146,9 +146,9 @@   -> IO (UniqG a b) uniqInMaxPoeticalN k info vN x = do   inner1 k info vN x >>= \(fsT,x) -> -    if isU x then return (U (V.filter (\(xs,_,_) -> xs /= fsT) . snd . get2 $ x))+    if isU x then return (U (V.filter ((/= fsT) . firstFrom3) . snd . get2 $ x))     else return (UL ((\(v1,v2) -> ((V.toList . V.map lastFrom3 $ v1) ++ (fromJust . fst . get2 $ x),v2)) . -      V.unstablePartition (\(xs,_,_) -> xs == fsT) . snd . get2 $ x))+      V.unstablePartition ((== fsT) . firstFrom3) . snd . get2 $ x)) {-# INLINE uniqInMaxPoeticalN #-}    -- | A variant of the 'uniqInMaxPoeticalN' where all the given \"properties\" are used.
uniqueness-periods-vector-general.cabal view
@@ -2,7 +2,7 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                uniqueness-periods-vector-general-version:             0.2.2.0+version:             0.2.3.0 synopsis:            Generalization of the functionality of the dobutokO-poetry-general-languages package description:         Generalization of the functionality of the dobutokO-poetry-general-languages package homepage:            https://hackage.haskell.org/package/uniqueness-periods-vector-general