| Copyright | (c) OleksandrZhabenko 2020 |
|---|---|
| License | MIT |
| Maintainer | olexandr543@yahoo.com |
| Stability | Experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Languages.UniquenessPeriods.Vector.ConstraintsG
Description
Provides several the most important variants of constraints for the
Vector of Vector Int that are 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
- unsafeOrderIJ :: Int -> Int -> Vector Int -> Bool
- filterOrderIJ :: Int -> Int -> Vector (Vector Int) -> Vector (Vector Int)
- unsafeTriples :: Int -> Int -> Int -> Vector (Vector Int) -> Vector (Vector Int)
- unsafeQuadruples :: Int -> Int -> Int -> Int -> Vector (Vector Int) -> Vector (Vector Int)
- unsafeSeveralA :: Int -> Vector Int -> Vector (Vector Int) -> Vector (Vector Int)
- unsafeSeveralB :: Int -> Vector Int -> Vector (Vector Int) -> Vector (Vector Int)
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
filterOrderIJ :: Int -> Int -> Vector (Vector Int) -> Vector (Vector Int) Source #
Being given the data satisfying the constraints in the module header returns the elements that satisfy unsafeOrderIJ as a predicate.
unsafeTriples :: Int -> Int -> Int -> Vector (Vector Int) -> Vector (Vector Int) Source #
Being given the data satisfying the constraints in the module header reduces the number of further computations in the Vector 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 :: Int -> Int -> Int -> Int -> Vector (Vector Int) -> Vector (Vector Int) Source #
Being given the data satisfying the constraints in the module header reduces the number of further computations in the Vector 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 :: Int -> Vector Int -> Vector (Vector Int) -> Vector (Vector Int) Source #
Being given the data satisfying the constraints in the module header reduces the number of further computations in the Vector 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 argument
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 are 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 all stand AFTER the element with the index equal to the first argument.
unsafeSeveralB :: Int -> Vector Int -> Vector (Vector Int) -> Vector (Vector Int) Source #
Being given the data satisfying the constraints in the module header reduces the number of further computations in the Vector 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 argument
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 are 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 all stand BEFORE the element with the index equal to the first argument.