|Maintainer||Alexey Khudyakov <email@example.com>|
Binning algorithms. This is mapping from set of interest to integer indices and approximate reverse.
- class Bin b where
- data BinI = BinI !Int !Int
- data BinF f
- binF :: RealFrac f => f -> Int -> f -> BinF f
- binFn :: RealFrac f => f -> f -> f -> BinF f
- data Bin2D bin1 bin2 = Bin2D bin1 bin2
- (><) :: bin1 -> bin2 -> Bin2D bin1 bin2
Abstract binning algorithm. Following invariant is expected to hold:
toIndex . fromIndex == id
Reverse is not nessearily true.
Convert from value to index. No bound checking performed
Convert from index to value.
Total number of bins
Integer bins. This is inclusive interval [from,to]
Floating point bins
Floaintg point bins with equal sizes.
Create bins. Note that actual upper bound can differ from specified.
2D bins. bin1 is binning along X axis and bin2 is one along Y axis.
|Bin2D bin1 bin2|