{-# LANGUAGE BangPatterns #-}
module Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG where
import CaseBi (getBFst')
import qualified Data.Vector as VB
import Phonetic.Languages.Simplified.DataG
import Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG
import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG
chooseMax :: (Ord c) => (Float -> c) -> Coeffs2 -> String -> FuncRep2 String Float c
chooseMax :: (Float -> c) -> Coeffs2 -> String -> FuncRep2 String Float c
chooseMax Float -> c
g Coeffs2
coeffs String
choice
| Coeffs2 -> Bool
forall a. CoeffTwo a -> Bool
isPair Coeffs2
coeffs = (FuncRep2 String Float c, Vector (String, FuncRep2 String Float c))
-> String -> FuncRep2 String Float c
forall a b. Ord a => (b, Vector (a, b)) -> a -> b
getBFst' ((Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBoth2InvF Float -> c
g Coeffs2
coeffs, [(String, FuncRep2 String Float c)]
-> Vector (String, FuncRep2 String Float c)
forall a. [a] -> Vector a
VB.fromList [(String
"02y",(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
procRhythmicity232F Float -> c
g String
"02y" Coeffs2
coeffs), (String
"0y",(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
procRhythmicity23F Float -> c
g String
"0y" Coeffs2
coeffs),
(String
"y",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBothF Float -> c
g Coeffs2
coeffs),(String
"y0",(Float -> c) -> FuncRep2 String Float c
forall c. Ord c => (Float -> c) -> FuncRep2 String Float c
procDiverse2F Float -> c
g),(String
"y2",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBoth2F Float -> c
g Coeffs2
coeffs),(String
"yy",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBothInvF Float -> c
g Coeffs2
coeffs)]) String
choice
| Bool
otherwise = (FuncRep2 String Float c, Vector (String, FuncRep2 String Float c))
-> String -> FuncRep2 String Float c
forall a b. Ord a => (b, Vector (a, b)) -> a -> b
getBFst' ((Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBoth2InvF Float -> c
g Coeffs2
coeffs, [(String, FuncRep2 String Float c)]
-> Vector (String, FuncRep2 String Float c)
forall a. [a] -> Vector a
VB.fromList [(String
"02y",(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
procRhythmicity232F Float -> c
g String
"02y" Coeffs2
coeffs),(String
"0y",(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> String -> Coeffs2 -> FuncRep2 String Float c
procRhythmicity23F Float -> c
g String
"0y" Coeffs2
coeffs),
(String
"y",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBothF Float -> c
g Coeffs2
coeffs),(String
"y0",(Float -> c) -> FuncRep2 String Float c
forall c. Ord c => (Float -> c) -> FuncRep2 String Float c
procDiverse2F Float -> c
g),(String
"y2",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBoth2F Float -> c
g Coeffs2
coeffs),(String
"yy",(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
forall c.
Ord c =>
(Float -> c) -> Coeffs2 -> FuncRep2 String Float c
procBothInvF Float -> c
g Coeffs2
coeffs)]) String
choice
precChoice :: String -> Maybe Int
precChoice :: String -> Maybe Int
precChoice = (Maybe Int, Vector (String, Maybe Int)) -> String -> Maybe Int
forall a b. Ord a => (b, Vector (a, b)) -> a -> b
getBFst' (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
4, [(String, Maybe Int)] -> Vector (String, Maybe Int)
forall a. [a] -> Vector a
VB.fromList [(String
"02y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"0y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y0",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y2",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0)])