packages feed

phonetic-languages-simplified-common 0.3.0.0 → 0.3.1.0

raw patch · 3 files changed

+39/−23 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Phonetic.Languages.Simplified.DataG: toMetrices' :: FuncRep2 (t a) b c -> t a -> b
+ Phonetic.Languages.Simplified.DataG: toTransMetrices' :: FuncRep2 (t a) b c -> t a -> c
- Phonetic.Languages.Simplified.DataG: maximumGroupsClassificationR :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord c, Integral d) => d -> FuncRep2 (t a) b c -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
+ Phonetic.Languages.Simplified.DataG: maximumGroupsClassificationR :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c, Integral d) => d -> FuncRep2 (t a) b c -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))

Files

CHANGELOG.md view
@@ -17,3 +17,8 @@  * Third version. Added a new module Phonetic.Languages.Simplified.Lists.UniquenessPeriodsG with simplified versions of the functions from the uniqueness-periods-vector and Languages.UniquenessPeriods.Vector.PropertiesG module from phonetic-languages-properties packages.++## 0.3.1.0 -- 2020-11-28++* Third version revised A. Added new functions to the module Phonetic.Languages.Simplified.DataG. Switched to the strict variants of the functions in the+first arguments.
Phonetic/Languages/Simplified/DataG.hs view
@@ -42,21 +42,21 @@   :: (Foldable t2, Ord c) => FuncRep2 (t a) b c   -> t2 (t a)   -> Result t a b c-maximumEl frep2 data0 =-  let l = F.maximumBy (\x y -> compare (getAC frep2 x) (getAC frep2 y)) data0-      m = getAB frep2 l-      tm = getBC frep2 m in R {line = l, metrices = m, transMetrices = tm}+maximumEl !frep2 data0 =+  let !l = F.maximumBy (\x y -> compare (getAC frep2 x) (getAC frep2 y)) data0+      !m = getAB frep2 l+      !tm = getBC frep2 m in R {line = l, metrices = m, transMetrices = tm}  minMaximumEls   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord (t a), Ord c) => FuncRep2 (t a) b c   -> t2 (t a)   -> (Result t a b c,Result t a b c)-minMaximumEls frep2 data0 =-  let (ln,lx) = minMax11ByC (\x y -> compare (getAC frep2 x) (getAC frep2 y)) data0-      mn = getAB frep2 ln-      mx = getAB frep2 lx-      tmn = getBC frep2 mn-      tmx = getBC frep2 mx in (R {line = ln, metrices = mn, transMetrices = tmn}, R {line = lx, metrices = mx, transMetrices = tmx})+minMaximumEls !frep2 data0 =+  let (!ln,!lx) = minMax11ByC (\x y -> compare (getAC frep2 x) (getAC frep2 y)) data0+      !mn = getAB frep2 ln+      !mx = getAB frep2 lx+      !tmn = getBC frep2 mn+      !tmx = getBC frep2 mx in (R {line = ln, metrices = mn, transMetrices = tmn}, R {line = lx, metrices = mx, transMetrices = tmx})  maximumElR   :: (Foldable t2, Ord c) => t2 (Result t a b c)@@ -74,44 +74,55 @@   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c) => FuncRep2 (t a) b c   -> t2 (t a)   -> (t2 (t a), t2 (t a))-innerPartitioning frep2 data0 =-  let l = getAC frep2 . F.maximumBy (\x y -> compare (getAC frep2 x) (getAC frep2 y)) $ data0 in partitionG ((== l) . getAC frep2) data0+innerPartitioning !frep2 data0 =+  let !l = getAC frep2 . F.maximumBy (\x y -> compare (getAC frep2 x) (getAC frep2 y)) $ data0 in partitionG ((== l) . getAC frep2) data0  maximumGroupsClassification   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, Integral d) => d   -> FuncRep2 (t a) b c   -> (t2 (t a), t2 (t a))   -> (t2 (t a), t2 (t a))-maximumGroupsClassification nGroups frep2 (dataT,dataF)+maximumGroupsClassification !nGroups !frep2 (dataT,dataF)  | nGroups <= 0 = (dataT,dataF)  | otherwise = maximumGroupsClassification (nGroups - 1) frep2 (dataT `mappend` partT,partF)-     where (partT,partF) = innerPartitioning frep2 dataF+     where (!partT,!partF) = innerPartitioning frep2 dataF  maximumGroupsClassification1   :: (InsertLeft t2 (t a), Monoid (t2 (t a)), Ord c, Integral d) => d   -> FuncRep2 (t a) b c   -> t2 (t a)   -> (t2 (t a), t2 (t a))-maximumGroupsClassification1 nGroups frep2 data0+maximumGroupsClassification1 !nGroups !frep2 data0  | nGroups <= 0 = innerPartitioning frep2 data0  | otherwise = maximumGroupsClassification (nGroups - 1) frep2 . innerPartitioning frep2 $ data0  maximumGroupsClassificationR-  :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord c, Integral d) => d+  :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c, Integral d) => d   -> FuncRep2 (t a) b c   -> t2 (Result t a b c)   -> (t2 (Result t a b c), t2 (Result t a b c))-maximumGroupsClassificationR nGroups frep2 data0+maximumGroupsClassificationR !nGroups !frep2 data0  | nGroups <= 1 = (partT,partF)  | otherwise = (partT `mappend` (fst . maximumGroupsClassificationR (nGroups - 1) frep2 $ partF),snd . maximumGroupsClassificationR (nGroups - 1) frep2 $ partF)-     where maxE0 = transMetrices . F.maximumBy (\x y -> compare (transMetrices x) (transMetrices y)) $ data0-           (partT,partF) = partitionG ((== maxE0) . transMetrices) data0+     where !maxE0 = F.maximum . mapG transMetrices $ data0+           (!partT,!partF) = partitionG ((== maxE0) . transMetrices) data0  toResultR   :: FuncRep2 (t a) b c   -> t a   -> Result t a b c-toResultR frep2 ys = R { line = ys, metrices = m, transMetrices = tm}-  where m = getAB frep2 ys-        tm = getBC frep2 m+toResultR !frep2 !ys = R { line = ys, metrices = m, transMetrices = tm}+  where !m = getAB frep2 ys+        !tm = getBC frep2 m +toMetrices'+  :: FuncRep2 (t a) b c+  -> t a+  -> b+toMetrices' !frep2 !ys = getAB frep2 ys++toTransMetrices'+  :: FuncRep2 (t a) b c+  -> t a+  -> c+toTransMetrices' !frep2 !ys = getAC frep2 ys
phonetic-languages-simplified-common.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-common-version:             0.3.0.0+version:             0.3.1.0 synopsis:            A simplified version of the phonetic-languages-functionality description:         A simplified version of the phonetic-languages-functionality. Tries to use only necessary functionality and reduce the other one. homepage:            https://hackage.haskell.org/package/phonetic-languages-simlified-common