phonetic-languages-constraints-0.4.0.0: Constraints to filter the needed permutations
Copyright(c) OleksandrZhabenko 2020
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Languages.UniquenessPeriods.Vector.Constraints

Description

Provides several the most important variants of constraints for the permutations. All the Vector here must consists of unique Int starting from 0 to n and the Int arguments must be in the range [0..n] though these inner constraints are not checked. It is up to user to check them.

Synopsis

Basic predicate

unsafeOrderIJ :: Int -> Int -> Vector Int -> Bool Source #

Being given the data satisfying the constraints in the module header checks whether in the Vector the first argument stands before the second one.

Functions to work with permutations with basic constraints (Vector-based)

filterOrderIJ :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => Int -> Int -> t (Vector Int) -> t (Vector Int) Source #

Being given the data satisfying the constraints in the module header returns the elements that satisfy unsafeOrderIJ as a predicate.

unsafeTriples :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => Int -> Int -> Int -> t (Vector Int) -> t (Vector Int) Source #

Being given the data satisfying the constraints in the module header reduces the number of further computations in the foldable structure of the permutations each one being represented as Vector Int where Int are all the numbers in the range [0..n] without duplication if the arguments are the indeces of the duplicated words or their concatenated combinations in the corresponding line. The first three arguments are the indices of the the triple duplicated elements (words or their concatenated combinations in the phonetic-languages series of packages).

unsafeQuadruples :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => Int -> Int -> Int -> Int -> t (Vector Int) -> t (Vector Int) Source #

Being given the data satisfying the constraints in the module header reduces the number of further computations in the foldable structure of the permutations each one being represented as Vector Int where Int are all the numbers in the range [0..n] without duplication if the arguments are the indeces of the duplicated words or their concatenated combinations in the corresponding line. The first four arguments are the indices of the the quadruple duplicated elements (words or their concatenated combinations in the phonetic-languages series of packages).

With multiple elements specified

unsafeSeveralA :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => Int -> Vector Int -> t (Vector Int) -> t (Vector Int) Source #

Being given the data satisfying the constraints in the module header reduces the number of further computations in the foldable structure of the permutations each one being represented as Vector Int where Int are all the numbers in the range [0..n] without duplication. The first (VB.Vector Int)rgument is the index of the the element (a word or their concatenated combination in the phonetic-languages series of packages), the second argument is Vector of indices that (VB.Vector Int)re in the range [0..n]. Filters (and reduces further complex computtions) the permutations so that only the variants with the indices in the second argument (VB.Vector Int)ll stand AFTER the element with the index equal to the first (VB.Vector Int)rgument.

unsafeSeveralB :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => Int -> Vector Int -> t (Vector Int) -> t (Vector Int) Source #

Being given the data satisfying the constraints in the module header reduces the number of further computations in the foldable structure of the permutations each one being represented as Vector Int where Int are all the numbers in the range [0..n] without duplication. The first (VB.Vector Int)rgument is the index of the the element (a word or their concatenated combination in the phonetic-languages series of packages), the second argument is Vector of indices that (VB.Vector Int)re in the range [0..n]. Filters (and reduces further complex computtions) the permutations so that only the variants with the indices in the second argument (VB.Vector Int)ll stand BEFORE the element with the index equal to the first (VB.Vector Int)rgument.