Copyright | (c) OleksandrZhabenko 2022-2023 |
---|---|
License | MIT |
Maintainer | oleksandr.zhabenko@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A module to provide the simple version of the obtaining from the list of values the list of other
values, the pre-defined ones. Provides both pure functions and monadic versions. Contrary to
ListQuantizer module, the results in every function here depend on the two values,
which the point is located in between. Defined for just positive real numbers of Double
type.
Synopsis
- round2 :: Bool -> Double -> Double -> Double -> Maybe Double
- round2L :: Bool -> [Double] -> Double -> Double
- twoQuantizer :: Bool -> [Double] -> [Double] -> [Double]
- round2G :: Ord a => Bool -> (a -> a -> a -> Ordering) -> a -> a -> a -> Maybe a
- round2GL :: Ord a => Bool -> (a -> a -> a -> Ordering) -> [a] -> a -> a
- twoQuantizerG :: (Ord a, Floating a) => Bool -> (a -> a -> a -> Ordering) -> [a] -> [a] -> [a]
- round2GM :: (Ord a, Monad m) => Bool -> (a -> a -> a -> m Ordering) -> a -> a -> a -> m (Maybe a)
- round2GLM :: (Ord a, Monad m) => Bool -> (a -> a -> a -> m Ordering) -> [a] -> a -> m a
- meanF2 :: Floating a => [a] -> a -> a -> a
- twoQuantizerGM :: (Ord a, Floating a, Monad m) => Bool -> (a -> a -> a -> m Ordering) -> [a] -> [a] -> m [a]
Documentation
:: Bool | If |
-> Double | |
-> Double | This one should lie between the other two similar parameters — the one before and the one after it. |
-> Double | |
-> Maybe Double | The numeric value (in |
:: Ord a | |
=> Bool | If |
-> (a -> a -> a -> Ordering) | |
-> a | |
-> a | |
-> a | |
-> Maybe a | The |