Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
Helps to order the 7 or less Ukrainian words (or their concatenations) to obtain (to some extent) suitable for poetry or music text.
Synopsis
- type Uniqueness = ([Int], Vector Int, String)
- uniqNPoeticalN :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO ()
- uniqNPoeticalVN :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqMaxPoeticalGNV :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> Uniqueness
- uniqInMaxPoeticalN :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqInMaxPoeticalNLine :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqNPoeticalNLine :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO ()
- uniqInMaxPoeticalNL :: Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqInMaxPoeticalNLineL :: Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqNPoeticalNL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO ()
- uniqNPoeticalNLineL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO ()
- uniqNPoeticalVNL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness)
- uniqMaxPoeticalGNVL :: Vector ([Int] -> Int) -> Vector Uniqueness -> Uniqueness
Documentation
Main functions
uniqNPoeticalN :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO () Source #
Prints n
(given as the first argument) maximum elements with respect to the several norms (their quantity is the second argument) starting
from the right to the left. The last norm is the first element in the Vector
of norms ([Int] -> Int
).
uniqNPoeticalVN :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Prints n
(given as the first argument) maximum elements with respect to the several norms (their quantity is the second argument) starting
from the right to the left. The last norm is the first element in the Vector
of norms ([Int] -> Int
). Contrary to its pair function
uniqNPoeticalN
returns then the rest of the given Vector
Uniqueness
after filtering the printed elements String
.
Additional functions
uniqMaxPoeticalGNV :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> Uniqueness Source #
The function evaluates the Vector
of Uniqueness
elements to retrieve the possibly maximum element in it with respect to the order
and significance (principality) of the norms being evaluated. The most significant and principal is the norm, 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 norm and so on. Is similar to uniqMaxPoeticalGN
function.
uniqInMaxPoeticalN :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Prints the maximum element with respect of the k
norms (the most significant of which is the rightest one, then to the left less significant etc.),
which is given as the first argument. The last norm is the first element in the Vector
of norms ([Int] -> Int
).
On one line output
uniqInMaxPoeticalNLine :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Generalized variant of the uniqInMaxPoeticalN
with usage of the several norms and all the information is printed on the same line.
uniqNPoeticalNLine :: Int -> Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO () Source #
Variant of the uniqNPoeticalN
with its output being printed on the same line.
With all the norms used
uniqInMaxPoeticalNL :: Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Variant of uniqInMaxPoticalN
where all the elements in the norms Vector
are used as norms from right to left.
uniqInMaxPoeticalNLineL :: Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Variant of uniqInMaxPoticalNLine
where all the elements in the norms Vector
are used as norms from right to left.
uniqNPoeticalNL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO () Source #
Variant of uniqNPoeticalN
where all the elements in the norms Vector
are used as norms from right to left.
uniqNPoeticalNLineL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO () Source #
Variant of uniqNPoeticalNLine
where all the elements in the norms Vector
are used as norms from right to left.
uniqNPoeticalVNL :: Int -> Vector ([Int] -> Int) -> Vector Uniqueness -> IO (Vector Uniqueness) Source #
Variant of uniqNPoeticalVN
where all the elements in the norms Vector
are used as norms from right to left.
uniqMaxPoeticalGNVL :: Vector ([Int] -> Int) -> Vector Uniqueness -> Uniqueness Source #
Variant of uniqMaxPoeticalGNV
where all the elements in the norms Vector
are used as norms from right to left.