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

Description

Provides a way to encode the needed constraint with possibly less symbols.

Synopsis

Data types

data EncodedContraints a b Source #

Constructors

E a 
Q a a a a a 
T a a a a 
SA a a b 
SB a a b 
F a a a 

Functions to work with them

Read functions

readMaybeEC :: Int -> String -> Maybe EncodedCnstrs Source #

Inspired by the: https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Maybe.html Is provided here as a more general way to read the String into a EncodedCnstrs than more restricted but safer readMaybeECG. It is up to user to check whether the parameters are in the correct form, the function does not do the full checking. For phonetic-languages applications, it is better to use readMaybeECG function instead.

readMaybeECG :: Int -> String -> Maybe EncodedCnstrs Source #

A safer variant of the readMaybeEC more suitable for applications, e. g. for phonetic-languages series of packages.

Process-encoding functions

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

Must be applied to the correct vector of permutation indeces. Otherwise, it gives runtime error (exception). All the integers inside the EncodedCnstrs must be in the range [0..n] where n corresponds to the maximum element in the permutation Vector Int. Besides, n is (probably must be) not greater than 6.

decodeLConstraints :: (InsertLeft t (Vector Int), Monoid (t (Vector Int))) => [EncodedCnstrs] -> t (Vector Int) -> t (Vector Int) Source #

Must be applied to the correct vector of permutation indeces. Otherwise, it gives runtime error (exception). All the integers inside the EncodedCnstrs must be in the range [0..n] where n corresponds to the maximum element in the permutation Vector Int. Besides, n is (probably must be) not greater than 6.

Modifiers and getters

Predicates