histogram-fill-0.9.1.0: Library for histograms creation.

Safe HaskellNone
LanguageHaskell98

Data.Histogram.Bin.BinVar

Synopsis

Documentation

newtype BinVarG v a Source #

Bins of variable size. Bins are defined by a vector of cuts marking the boundary between bins. This assumes that the entire range is continuous. There are n+1 cuts for n bins. This also implies that cuts are in ascending order.

Constructors

BinVarG 

Fields

Instances
(Bin1D b, Vector v (BinValue b), Vector v Bool, a ~ BinValue b, Fractional a) => ConvertBin b (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

convertBin :: b -> BinVarG v a Source #

Eq (v a) => Eq (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

(==) :: BinVarG v a -> BinVarG v a -> Bool #

(/=) :: BinVarG v a -> BinVarG v a -> Bool #

(Vector v a, Vector v Bool, Read a, Ord a) => Read (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

(Vector v a, Show a) => Show (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

showsPrec :: Int -> BinVarG v a -> ShowS #

show :: BinVarG v a -> String #

showList :: [BinVarG v a] -> ShowS #

NFData (v a) => NFData (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

rnf :: BinVarG v a -> () #

(Vector v a, Ord a, Fractional a) => VariableBin (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

binSizeN :: BinVarG v a -> Int -> BinValue (BinVarG v a) Source #

(Vector v a, Ord a, Fractional a) => SliceableBin (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

unsafeSliceBin :: Int -> Int -> BinVarG v a -> BinVarG v a Source #

(Vector v a, Ord a, Fractional a) => Bin1D (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

(Vector v a, Ord a, Fractional a) => IntervalBin (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

binInterval :: BinVarG v a -> Int -> (BinValue (BinVarG v a), BinValue (BinVarG v a)) Source #

binsList :: Vector v0 (BinValue (BinVarG v a), BinValue (BinVarG v a)) => BinVarG v a -> v0 (BinValue (BinVarG v a), BinValue (BinVarG v a)) Source #

(Vector v a, Vector v Bool, Ord a, Fractional a) => BinEq (BinVarG v a) Source #

Equality is up to 3e-11 (2/3th of digits)

Instance details

Defined in Data.Histogram.Bin.BinVar

Methods

binEq :: BinVarG v a -> BinVarG v a -> Bool Source #

(Vector v a, Ord a, Fractional a) => Bin (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

Associated Types

type BinValue (BinVarG v a) :: * Source #

Methods

toIndex :: BinVarG v a -> BinValue (BinVarG v a) -> Int Source #

fromIndex :: BinVarG v a -> Int -> BinValue (BinVarG v a) Source #

nBins :: BinVarG v a -> Int Source #

inRange :: BinVarG v a -> BinValue (BinVarG v a) -> Bool Source #

type BinValue (BinVarG v a) Source # 
Instance details

Defined in Data.Histogram.Bin.BinVar

type BinValue (BinVarG v a) = a

type BinVar = BinVarG Vector Source #

Type synonym for BinVarG specialized for unboxed vectors

unsafeBinVar Source #

Arguments

:: v a

cuts

-> BinVarG v a 

Create variable bins unsafely

binVar Source #

Arguments

:: (Vector v a, Vector v Bool, Ord a) 
=> v a

cuts

-> BinVarG v a 

Create variable bins unsafely

cuts :: BinVarG v a -> v a Source #

access cuts

deleteCut :: (Vector v a, Ord a, Fractional a) => BinVarG v a -> Int -> BinVarG v a Source #

Delete a cut, which effectively reduces the entire range of the bins (if the cut was the first or last one) or merges two bins (if the cut was in the middle)

addCut :: (Vector v a, Ord a) => BinVarG v a -> a -> BinVarG v a Source #

insert a new cut which effectively extends the range of the bins or splits a bin