uniqueness-periods-vector-general 0.4.6.0 → 0.5.0.0
raw patch · 3 files changed
+21/−19 lines, 3 filesdep ~uniqueness-periods-vector-commonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: uniqueness-periods-vector-common
API changes (from Hackage documentation)
- Languages.UniquenessPeriods.Vector.General.Debug: maximumElGBy :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Int -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> UniquenessG1 a b
+ Languages.UniquenessPeriods.Vector.General.Debug: maximumElGBy :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Int -> Vector ([b] -> b) -> FuncRep [a] (Vector c) [b] -> [a] -> UniquenessG1 a b
- Languages.UniquenessPeriods.Vector.General.Debug: uniqNProperties2GN :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Int -> Int -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> UniqG2 a b
+ Languages.UniquenessPeriods.Vector.General.Debug: uniqNProperties2GN :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Int -> Int -> Vector ([b] -> b) -> FuncRep [a] (Vector c) [b] -> [a] -> UniqG2 a b
- Languages.UniquenessPeriods.Vector.General.Debug: uniquenessVariantsGN :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> Vector (UniquenessG1 a b)
+ Languages.UniquenessPeriods.Vector.General.Debug: uniquenessVariantsGN :: (Eq a, Ord b, Show a, Show b) => [a] -> Preapp a -> Vector ([b] -> b) -> FuncRep [a] (Vector c) [b] -> [a] -> Vector (UniquenessG1 a b)
Files
- ChangeLog.md +5/−0
- Languages/UniquenessPeriods/Vector/General/Debug.hs +14/−17
- uniqueness-periods-vector-general.cabal +2/−2
ChangeLog.md view
@@ -66,3 +66,8 @@ * Fourth version revised F. Fixed issue with incomplete information being printed in functions printUniquenessG1List and printUniquenessG1. Added a new function printUniquenessG1ListStr with prettier printing for the Char-based arguments (strings).++## 0.5.0.0 -- 2020-10-09++* Fifth version. Instead of two composable function application switched to the usage of the more flexible variant with FuncRep a b c data type from+renewed Languages.UniquenessPeriods.Vector.Data module. Updated the functions and documentation as needed.
Languages/UniquenessPeriods/Vector/General/Debug.hs view
@@ -178,33 +178,31 @@ -> Preapp a -- ^ A parameter to specify the lists to be prepended and postpended to the given data to be processed before actual processment. -> Int -- ^ The quantity of the represented as functions \"properties\" to be applied from the second argument. The order is from the right to the left. -> V.Vector ([b] -> b) -- ^ 'V.Vector' of the represented as functions \"properties\" to be applied consequently.- -> ([a] -> V.Vector c) -- ^ The first function that transforms the processed list into the form suitable for analyzing by the functions in the module.- -> (V.Vector c -> [b]) -- ^ The second function that transforms the suitable form data representation obtained by the previous argument application into the data that can be evaluated to get the result.+ -> FuncRep [a] (V.Vector c) [b] -- ^ Since version 0.5.0.0 it includes the previous variant with data constructor 'D2', but additionally allows to use just single argument with data constructor 'U1' -> [a] -- ^ The data to be processed. Often it can be a 'String' of the text. -> UniquenessG1 a b-maximumElGBy whspss rr k vN g1 g2 xs+maximumElGBy whspss rr k vN frep xs | compare k (V.length vN) == GT = error "Languages.UniquenessPeriods.Vector.General.Debug.maximumElGBy: undefined for that amount of norms. " | compare k 0 == GT =- let vM = uniquenessVariants2GNP (get1m rr) (get2m rr) whspss vN g1 g2 xs+ let vM = uniquenessVariants2GNP (get1m rr) (get2m rr) whspss vN frep 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) == V.unsafeIndex (secondFrom3 maxK) (k - 1)) vM in maximumElBy (k - 1) (V.unsafeSlice 0 (k - 1) vN) (UL2 ([],vK))- | otherwise = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 0) (V.unsafeIndex vN1 0)) . uniquenessVariantsGN whspss rr vN g1 g2 $ xs+ | otherwise = V.maximumBy (\(_,vN0,_) (_,vN1,_) -> compare (V.unsafeIndex vN0 0) (V.unsafeIndex vN1 0)) . uniquenessVariantsGN whspss rr vN frep $ xs -- | A variant for 'uniquenessVariants2GN' and 'uniquenessVariants2GNP' with the second argument defining, which one is used. uniquenessVariantsGN :: (Eq a, Ord b, Show a, Show b) => [a] -- ^ A list of \"whitespace symbols\" that delimits the sublists in the list to be processed. -> Preapp a -- ^ A parameter to specify the lists to be prepended and postpended to the given data to be processed before actual processment. -> V.Vector ([b] -> b) -- ^ 'V.Vector' of the represented as functions \"properties\" to be applied consequently.- -> ([a] -> V.Vector c) -- ^ The first function that transforms the processed list into the form suitable for analyzing by the functions in the module. Usually it is one of the functions 'uniquenessPeriodsVector1', 'uniquenessPeriodsVector2', or 'uniquenessPeriodsVector2' from the @uniqueness-periods-vector@ package. Usually it is one of the functions 'uniquenessPeriodsVector1', 'uniquenessPeriodsVector2', or 'uniquenessPeriodsVector3' from the @uniqueness-periods-vector@ package.- -> (V.Vector c -> [b]) -- ^ The second function that transforms the suitable form data representation obtained by the previous argument application into the data that can be evaluated to get the result. The predefined functions can be found in the package @uniqueness-periods-vector-properties@.+ -> FuncRep [a] (V.Vector c) [b] -- ^ Since version 0.5.0.0 it includes the previous variant with data constructor 'D2', but additionally allows to use just single argument with data constructor 'U1' -> [a] -- ^ The data to be processed. Often it can be a 'String' of the text. -> V.Vector (UniquenessG1 a b)-uniquenessVariantsGN whspss (PA ts us) vN g1 g2 = uniquenessVariants2GNP ts us whspss vN g1 g2-uniquenessVariantsGN whspss K vN g1 g2 = uniquenessVariants2GN whspss vN g1 g2+uniquenessVariantsGN whspss (PA ts us) vN frep = uniquenessVariants2GNP ts us whspss vN frep+uniquenessVariantsGN whspss K vN frep = uniquenessVariants2GN whspss vN frep {-# INLINE uniquenessVariantsGN #-} --- | Finds out the maximum element with respect of the @k@ \"properties\" (the most significant of which is the rightest one, then to the left less significant etc.),+-- | Finds out the group of maximum elements with respect of the @k@ \"properties\" (the most significant of which is the rightest one, then to the left less significant etc.), -- which is given as the first argument, and then rearranges the input moving the elements equal by the first element in the triple to the maximum element -- to the first element in the tuple. --@@ -239,7 +237,7 @@ -- | Finds out the @n@ (the first 'Int' argument) consequential maximum elements, and then rearranges the input moving the elements equal by the first element -- in the triple to the maximum element to the first element in the tuple. uniqNPropertiesN ::- (Eq a, Ord b, Show a, Show b) => Int -- ^ A quantity of the recursive calls that returns each one a new result from the rest of the data processed.+ (Eq a, Ord b, Show a, Show b) => Int -- ^ A quantity of the recursive calls that returns each one a new resulting group from the rest of the data processed. -> Int -- ^ The quantity of the represented as functions \"properties\" to be applied from the second argument. The order is from the right to the left. -> V.Vector ([b] -> b) -- ^ 'V.Vector' of the represented as functions \"properties\" to be applied consequently. -> UniqG2 a b -- ^ The data to be analyzed.@@ -251,7 +249,7 @@ -- | A variant of the 'uniqNPropertiesN' where all the given \"properties\" are used. uniqNPropertiesNAll ::- (Eq a, Ord b, Show a, Show b) => Int -- ^ A quantity of the recursive calls that returns each one a new result from the rest of the data processed.+ (Eq a, Ord b, Show a, Show b) => Int -- ^ A quantity of the recursive calls that returns each one a new resulting group from the rest of the data processed. -> 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@@ -264,13 +262,12 @@ uniqNProperties2GN :: (Eq a, Ord b, Show a, Show b) => [a] -- ^ A list of \"whitespace symbols\" that delimits the sublists in the list to be processed. -> Preapp a -- ^ A parameter to specify the lists to be prepended and postpended to the given data to be processed before actual processment.- -> Int -- ^ A quantity of the recursive calls that returns each one a new result from the rest of the data processed.+ -> Int -- ^ A quantity of the recursive calls that returns each one a new resulting group from the rest of the data processed. -> Int -- ^ The quantity of the represented as functions \"properties\" to be applied from the second argument. The order is from the right to the left. -> V.Vector ([b] -> b) -- ^ 'V.Vector' of the represented as functions \"properties\" to be applied consequently.- -> ([a] -> V.Vector c) -- ^ The first function that transforms the processed list into the form suitable for analyzing by the functions in the module. Usually it is one of the functions 'uniquenessPeriodsVector1', 'uniquenessPeriodsVector2', or 'uniquenessPeriodsVector3' from the @uniqueness-periods-vector@ package.- -> (V.Vector c -> [b]) -- ^ The second function that transforms the suitable form data representation obtained by the previous argument application into the data that can be evaluated to get the result. The predefined functions can be found in the package @uniqueness-periods-vector-properties@.+ -> FuncRep [a] (V.Vector c) [b] -- ^ Since version 0.5.0.0 it includes the previous variant with data constructor 'D2', but additionally allows to use just single argument with data constructor 'U1' -> [a] -- ^ The data to be processed. Often it can be a 'String' of the text. -> UniqG2 a b-uniqNProperties2GN whspss rr n k vN g1 g2 xs+uniqNProperties2GN whspss rr n k vN frep xs | n <= 0 = UL2 ([],V.empty)- | otherwise = let v = uniquenessVariants2GNP (get1m rr) (get2m rr) whspss vN g1 g2 xs in uniqNPropertiesN (n - 1) k vN . maximumElByVec k vN $ (UL2 ([],v))+ | otherwise = let v = uniquenessVariants2GNP (get1m rr) (get2m rr) whspss vN frep xs in uniqNPropertiesN (n - 1) k vN . maximumElByVec k vN $ (UL2 ([],v))
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.4.6.0+version: 0.5.0.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@@ -20,6 +20,6 @@ exposed-modules: Languages.UniquenessPeriods.Vector.General.Debug -- other-modules: other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, uniqueness-periods-vector-common >=0.4.1 && <1, print-info >=0.1.3 && <1+ build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, uniqueness-periods-vector-common >=0.5 && <1, print-info >=0.1.3 && <1 -- hs-source-dirs: default-language: Haskell2010