histogram-fill-0.8.2.0: Library for histograms creation.

Safe HaskellNone

Data.Histogram.Bin.BinF

Contents

Synopsis

Generic and slow

data BinF f Source

Floating point bins of equal size. Use following function for construction and inspection of value:

 b = binFstep (lowerLimit b) (binSize b) (nBins b)

Performance note. Since BinF is parametric in its value it could not be unpacked and every access to data will require pointer indirection. BinD is binning specialized to Doubles and it's always faster than BinF Double.

Instances

Typeable1 BinF 
RealFrac f => ConvertBin BinI (BinF f) 
RealFrac f => ConvertBin BinInt (BinF f) 
Eq f => Eq (BinF f) 
Data f => Data (BinF f) 
(Read f, RealFrac f) => Read (BinF f) 
Show f => Show (BinF f) 
NFData (BinF f) 
RealFrac f => UniformBin (BinF f) 
RealFrac f => VariableBin (BinF f) 
RealFrac f => MergeableBin (BinF f) 
RealFrac f => SliceableBin (BinF f) 
RealFrac f => Bin1D (BinF f) 
RealFrac f => IntervalBin (BinF f) 
RealFloat f => BinEq (BinF f)

Equality is up to 2/3th of digits

RealFrac f => Bin (BinF f) 

binFSource

Arguments

:: RealFrac f 
=> f

Lower bound of range

-> Int

Number of bins

-> f

Upper bound of range

-> BinF f 

Create bins.

binFnSource

Arguments

:: RealFrac f 
=> f

Begin of range

-> f

Size of step

-> f

Approximation of end of range

-> BinF f 

Create bins. Note that actual upper bound can differ from specified.

binFstepSource

Arguments

:: RealFrac f 
=> f

Begin of range

-> f

Size of step

-> Int

Number of bins

-> BinF f 

Create bins

scaleBinF :: (Show f, RealFrac f) => f -> f -> BinF f -> BinF fSource

'scaleBinF a b' scales BinF using linear transform 'a+b*x'

Specialized for Double and fast

data BinD Source

Floating point bins of equal sizes. If you work with Doubles this data type should be used instead of BinF.

binDSource

Arguments

:: Double

Lower bound of range

-> Int

Number of bins

-> Double

Upper bound of range

-> BinD 

Create bins.

binDnSource

Arguments

:: Double

Begin of range

-> Double

Size of step

-> Double

Approximation of end of range

-> BinD 

Create bins. Note that actual upper bound can differ from specified.

binDstepSource

Arguments

:: Double

Begin of range

-> Double

Size of step

-> Int

Number of bins

-> BinD 

Create bins

scaleBinD :: Double -> Double -> BinD -> BinDSource

'scaleBinF a b' scales BinF using linear transform 'a+b*x'