uniqueness-periods-vector 0.3.0.0 → 0.3.1.0
raw patch · 3 files changed
+12/−10 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- String.Languages.UniquenessPeriods.Vector: helpUPV3 :: [Int] -> [Int] -> [Int]
+ String.Languages.UniquenessPeriods.Vector: helpUPV3 :: [Int] -> [Int] -> [Int] -> [Int]
Files
- ChangeLog.md +4/−2
- String/Languages/UniquenessPeriods/Vector.hs +7/−7
- uniqueness-periods-vector.cabal +1/−1
ChangeLog.md view
@@ -6,10 +6,12 @@ ## 0.2.0.0 -- 2020-09-07 -* Second version. Added the new type constuctor UG3 to the UniquenessGeneral1 data type. Added new functions related to uniquenessPeriodsVector3. +* Second version. Added the new type constuctor UG3 to the UniquenessGeneral1 data type. Added new functions related to uniquenessPeriodsVector3. ## 0.3.0.0 -- 2020-09-09 -* Third version. Fixed issue with helpUPV3 function. +* Third version. Fixed issue with helpUPV3 function. +## 0.3.1.0 -- 2020-10-14 +* Third version revised A. Changed the representation of the helpUPV3 function. Some related code and documentation changes.
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 . + 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 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.-helpUPV3 :: [Int] -> [Int] -> [Int]-helpUPV3 (z:zs) (x:y:xs) - | compare ((x - z) * (y - z)) 0 == LT = (y - x):helpUPV3 zs (y:xs)- | compare y z == GT = helpUPV3 zs (x:y:xs)- | otherwise = helpUPV3 (z:zs) (y:xs)-helpUPV3 _ _ = []+helpUPV3 :: [Int] -> [Int] -> [Int] -> [Int]+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
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.0.0+version: 0.3.1.0 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