phonetic-languages-general-0.3.0.1: A generalization of the uniqueness-periods-vector-general functionality.
Copyright(c) OleksandrZhabenko 2020
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Languages.UniquenessPeriods.Vector.General.Simplified

Description

Simplified versions of the respective functions from the Languages.UniquenessPeriods.Vector.General.DebugG module but they can be used basically once but not applied recursively to the same data (without additional processments).

Synopsis

Pure functions

Self-recursive pure functions and connected with them ones

maximumElBy Source #

Arguments

:: (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a)), Foldable t2, 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 (t2 b -> b)

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

-> Vector (UniquenessG1T2 t t2 a b)

The data to be analyzed.

-> UniquenessG1T2 t t2 a b

The maximum element in respect with the given parameters.

The function evaluates the Vector of UniquenessG1T2 t t2 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 phonetic-languages-properties.

Pure functions

maximumElByAll Source #

Arguments

:: (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a)), Foldable t2, Ord b, Show a, Show b) 
=> Vector (t2 b -> b)

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

-> Vector (UniquenessG1T2 t t2 a b)

The data to be analyzed.

-> UniquenessG1T2 t t2 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, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a)), Foldable t2, UGG1 t (PreApp t a) a, Ord b, Show a, Show b) 
=> t a

The "whitespace symbols" that delimit the subs in the Foldable structure to be processed.

-> a

The first "whitespace symbol" from the left.

-> PreApp t a

A parameter to specify the lists to be prepended and postpended to the given data to be processed before actual processment.

-> (t a -> Vector a)

The function that is used internally to convert to the boxed Vector of a so that the function can process further the permutations

-> (t (t a) -> Vector (Vector a))

The function that is used internally to convert to the boxed Vector of Vector of a so that the function can process further

-> (Vector a -> t a)

The function that is used internally to convert from the boxed Vector of a so that the function can process further

-> Vector (Vector Int)

The list of permutations of Int indices starting from 0 and up to n (n is probably less than 7).

-> 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 (t2 b -> b)

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

-> FuncRep (t a) (Vector c) (t2 b)

It includes the defined earlier variant with data constructor D2, but additionally allows to use just single argument with data constructor U1

-> t a

The data to be processed.

-> UniquenessG1T2 t t2 a b 

The function evaluates the generated Vector of UniquenessG1T2 t t2 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.

maximumElByVec Source #

Arguments

:: (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a)), Foldable t2, 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 (t2 b -> b)

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

-> Vector (UniquenessG1T2 t t2 a b)

The data to be analyzed.

-> Vector (UniquenessG1T2 t t2 a b) 

Filters the last argument. 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.) of the second argument. The number of "properties" is given as the first argument. Then the function rearranges the last argument by moving the elements equal by the second element in the triple to the maximum element to the first element in the resulting tuple. The elements that are not equal to the maximum one are moved to the second element in the tuple. If the second element of the tuple is empty, then just returns the last argument.

The last by significance "property" is the first element in the Vector of "properties" ([b] -> b) (so that the order of significance is from the right to the left in the respective Vector). If the length of the vector of properties is greater than the first argument then the last element(s) in the vector do not participate in producing the result (are ignored).

maximumElByVecAll Source #

Arguments

:: (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a)), Foldable t2, Ord b, Show a, Show b) 
=> Vector (t2 b -> b)

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

-> Vector (UniquenessG1T2 t t2 a b)

The data to be analyzed.

-> Vector (UniquenessG1T2 t t2 a b) 

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