quantizer-0.1.0.0: Library to provide the behaviour similar to quantum states superposition.
Safe HaskellSafe-Inferred
LanguageHaskell2010

FoldableQuantizer

Documentation

round2G Source #

Arguments

:: (Ord a, InsertLeft t a, Monoid (t a)) 
=> Bool

If True then the function rounds the result in the ambiguous situation to the greater value.

-> (t a -> a -> Ordering) 
-> t a 
-> a 
-> Maybe a

The a value (in Just case) can be equal just to the one of the two first a arguments.

foldableQuantizerG Source #

Arguments

:: (Ord a, Floating a, Integral a, InsertLeft t1 a, Monoid (t1 a), Foldable t2) 
=> Bool

If True then the function rounds the result in the ambiguous situation to the greater value.

-> (t1 a -> a -> Ordering) 
-> t1 a 
-> t2 a 
-> [a] 

round2GM Source #

Arguments

:: (Ord a, Monad m, InsertLeft t1 a, Monoid (t1 a)) 
=> Bool

If True then the function rounds the result in the ambiguous situation to the greater value.

-> (t1 a -> a -> m Ordering) 
-> t1 a 
-> a 
-> m (Maybe a) 

foldableQuantizerGM Source #

Arguments

:: (Ord a, Floating a, Integral a, Monad m, InsertLeft t1 a, Monoid (t1 a), Foldable t2) 
=> Bool

If True then the function rounds the result in the ambiguous situation to the greater value.

-> (t1 a -> a -> m Ordering) 
-> t1 a 
-> t2 a 
-> m [a]