packages feed

uniqueness-periods-vector 0.3.1.0 → 0.3.1.1

raw patch · 3 files changed

+10/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -15,3 +15,7 @@ ## 0.3.1.0 -- 2020-10-14  * Third version revised A. Changed the representation of the helpUPV3 function. Some related code and documentation changes.++## 0.3.1.1 -- 2020-10-14++* Third version revised B. Some code improvements.
String/Languages/UniquenessPeriods/Vector.hs view
@@ -63,15 +63,15 @@  | V.null v = V.empty  | otherwise = let !v1 = V.indexed v in let !vs = V.toList . V.findIndices (`elem` whspss) $ v in      let f !x = if V.null x then Nothing -                else Just . (\vws (v2,v3) -> ((helpUPV3 vws [] . V.toList . V.map fst $ v2,snd . -                  V.unsafeIndex v2 $ 0),v3)) vs . V.partition (\(_,xs) -> xs == (snd . V.unsafeIndex x $ 0)) $ x in +                else let !idX0 = snd . V.unsafeIndex x $ 0 in Just . (\vws (v2,v3) -> ((helpUPV3 vws [] . V.toList . V.map fst $ v2,snd . +                  V.unsafeIndex v2 $ 0),v3)) vs . V.partition (\(_,xs) -> xs == idX0) $ x in                      V.filter (\(ys,!zs) -> not (null ys) && (zs `notElem` whspss)) . V.unfoldr f $ v1 --- | Is used inside the 'uniquenessPeriodsVector3'. Both list arguments of non-negative numbers (if not empty) must be sorted in the ascending order.+-- | Is used inside the 'uniquenessPeriodsVector3'. The first and the third list arguments of non-negative numbers (if not empty) must be sorted in the ascending order. helpUPV3 :: [Int] -> [Int] -> [Int] -> [Int]-helpUPV3 (z:zs) acc (x:y:xs) +helpUPV3 (z:zs) !acc (x:y:xs)   | compare ((x - z) * (y - z)) 0 == LT = helpUPV3 zs ((y - x):acc) (y:xs)  | compare y z == GT = helpUPV3 zs acc (x:y:xs)  | otherwise = helpUPV3 (z:zs) acc (y:xs)-helpUPV3 _ acc _ = acc+helpUPV3 _ !acc _ = acc 
uniqueness-periods-vector.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/  name:                uniqueness-periods-vector-version:             0.3.1.0+version:             0.3.1.1 synopsis:            Generalization of the uniqueness-periods and uniqueness-periods-general packages functionality. description:         Generalization of the uniqueness-periods and uniqueness-periods-general packages functionality. homepage:            https://hackage.haskell.org/package/uniqueness-periods-vector