Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- minMax11C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> (a, a)
- minMax11ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> (a, a)
- minMax21C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), a)
- minMax21ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), a)
- minMax12C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> (a, (a, a))
- minMax12ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> (a, (a, a))
- minMax22C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), (a, a))
- minMax22ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), (a, a))
Documentation
minMax11C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> (a, a) Source #
Finds out the minimum and maximum values of the finite structure that has not less than two elements.
minMax11ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> (a, a) Source #
A generalized variant of the minMax
where you can specify your own comparison function.
minMax21C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), a) Source #
Given a finite structure returns a tuple with the two most minimum elements (the first one is less than the second one) and the maximum element. Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax21ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), a) Source #
A variant of the minMax21C
where you can specify your own comparison function.
minMax12C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> (a, (a, a)) Source #
Given a finite structure returns a tuple with the minimum element and two maximum elements (the first one is less than the second one). Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax12ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> (a, (a, a)) Source #
A variant of the minMax12C
where you can specify your own comparison function.
minMax22C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), (a, a)) Source #
Given a finite structure returns a tuple with two minimum elements and two maximum elements. Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax22ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), (a, a)) Source #
A variant of the minMax22C
where you can specify your own comparison function.