uniqueness-periods-vector-general-0.4.2.0: Generalization of the functionality of the dobutokO-poetry-general-languages package

Copyright(c) OleksandrZhabenko 2020
LicenseMIT
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Languages.UniquenessPeriods.Vector.General.Debug

Contents

Description

Maintainer : olexandr543@yahoo.com

Generalization of the functionality of the DobutokO.Poetry.General.Debug module from the dobutokO-poetry-general-languages package. Since 0.3.0.0 version changed the names of most functions to more appropriate. The conversion table of the old to new names are given in a file ConversionTable.txt in the main source directory.

Synopsis

Pure functions

Self-recursive pure functions and connected with them ones

maximumElBy Source #

Arguments

:: (Eq a, Ord b) 
=> 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.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniquenessG1 a b

The maximum element in respect with the given parameters.

The function evaluates the Vector of UniquenessG1 a b elements (related with the third argument) to retrieve the possibly maximum element in it with respect to the order and significance (principality) of the "properties" (represented as the functions f :: [b] -> b) being evaluated. The most significant and principal is the "property", which index in the Vector of them is the Int argument (so it is the first one) of the function minus 1, then less significant is the next to the left "property" and so on. The predefined library "properties" or related to them functions can be found in the package uniqueness-periods-vector-properties.

uniqNPropertiesN Source #

Arguments

:: (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.

-> 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.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniqG2 a b 

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.

uniqNPropertiesNAll Source #

Arguments

:: (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.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniqG2 a b 

A variant of the uniqNPropertiesN where all the given "properties" are used.

uniqNProperties2GN Source #

Arguments

:: (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

The quantity of the represented as functions "properties" to be applied from the second argument. The order is from the right to the left.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> ([a] -> 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.

-> (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.

-> [a]

The data to be processed. Often it can be a String of the text.

-> UniqG2 a b 

The full analyzing and processment function.

Pure functions

maximumElByAll Source #

Arguments

:: (Eq a, Ord b, Show a, Show b) 
=> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniquenessG1 a b

The maximum element according to the given "properties".

Variant of the maximumElBy function where all the given "properties" are used. The predefined library "properties" or related to them functions can be found in the package uniqueness-periods-vector-properties.

maximumElGBy Source #

Arguments

:: (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

The quantity of the represented as functions "properties" to be applied from the second argument. The order is from the right to the left.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> ([a] -> Vector c)

The first function that transforms the processed list into the form suitable for analyzing by the functions in the module.

-> (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.

-> [a]

The data to be processed. Often it can be a String of the text.

-> UniquenessG1 a b 

The function evaluates the generated Vector of UniquenessG1 a b elements to retrieve the possibly maximum element in it with respect to the order and significance (principality) of the "properties" being evaluated. The most significant and principal is the "property", which index in the Vector of them is the Int argument of the function minus 1, then less significant is the next to the left "property" and so on.

uniquenessVariantsGN Source #

Arguments

:: (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.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> ([a] -> 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.

-> (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.

-> [a]

The data to be processed. Often it can be a String of the text.

-> Vector (UniquenessG1 a b) 

A variant for uniquenessVariants2GN and uniquenessVariants2GNP with the second argument defining, which one is used.

maximumElByVec Source #

Arguments

:: (Eq a, Ord b, Show a, Show b) 
=> 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.

-> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniqG2 a b 

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.), 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.

The last "property" is the first element in the Vector of "properties" ([b] -> b).

maximumElByVecAll Source #

Arguments

:: (Eq a, Ord b, Show a, Show b) 
=> Vector ([b] -> b)

Vector of the represented as functions "properties" to be applied consequently.

-> UniqG2 a b

The data to be analyzed.

-> UniqG2 a b 

A variant of the maximumElByVec where all the given "properties" are used.

IO functions

Printing subsystem

toFile Source #

Arguments

:: 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.

-> IO () 

Prints every String from the list on the new line to the file. Uses appendFile function inside.

printUniquenessG1 Source #

Arguments

:: (Show a, Show b) 
=> Info2

A parameter to control the predefined behaviour of the printing. The I1 branch prints to the stdout and the I2 - to the file.

-> UniquenessG1 a b

The element, for which the information is printed.

-> IO () 

Is used to print output specified to the stdout or to the FilePath specified as the inner argument in the Info2 parameter.

printUniquenessG1List Source #

Arguments

:: (Show a, Show b) 
=> Info2

A parameter to control the predefined behaviour of the printing. The I1 branch prints to the stdout and the I2 - to the file.

-> [UniquenessG1 a b]

The list of elements, for which the information is printed.

-> IO () 

Is used to print output specified to the stdout or to the FilePath specified as the inner argument in the Info2 parameter.