Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HistogramConfig a
- config :: forall a. (Integral a, Bits a) => a -> a -> SignificantFigures -> HistogramConfig a
- lowest :: HistogramConfig a -> a
- highest :: HistogramConfig a -> a
- sigFigures :: HistogramConfig a -> SignificantFigures
- bucketCount :: HistogramConfig a -> Int
- subBucketCount :: HistogramConfig a -> Int
- size :: HistogramConfig a -> Int
- newtype SignificantFigures = SignificantFigures Int
- significantFigures :: Int -> Either String SignificantFigures
- data Range a = Range {}
- data Index = Index {}
- asInt :: HistogramConfig a -> Index -> Int
- fromInt :: HistogramConfig a -> Int -> Index
- asIndex :: (Integral a, FiniteBits a) => HistogramConfig a -> a -> Index
- fromIndex :: (Integral a, Bits a) => HistogramConfig a -> Index -> Range a
- bitLength :: FiniteBits b => b -> Int
Documentation
data HistogramConfig a Source #
Supporting data to transform a value from a
within a range of
lowest
to highest
, while maintaining sigFigures
amount of
precision, to an Int
.
:: (Integral a, Bits a) | |
=> a | The lowest recordable value |
-> a | The highest recordable value |
-> SignificantFigures | |
-> HistogramConfig a |
smart constructor for HistogramConfig
lowest :: HistogramConfig a -> a Source #
The lowest expected recorded value
highest :: HistogramConfig a -> a Source #
The highest expected recorded value
sigFigures :: HistogramConfig a -> SignificantFigures Source #
The number of significant figures for recorded values
bucketCount :: HistogramConfig a -> Int Source #
the total number of buckets
subBucketCount :: HistogramConfig a -> Int Source #
the total number sub buckets per bucket
size :: HistogramConfig a -> Int Source #
the total number of elements distinct indices
newtype SignificantFigures Source #
The number of significant figures for recorded values
significantFigures :: Int -> Either String SignificantFigures Source #
Construct a SignificantFigures
. Valid values are between 1 and 5
An HistogramConfig
specific internal representation of an index
asIndex :: (Integral a, FiniteBits a) => HistogramConfig a -> a -> Index Source #
fromIndex :: (Integral a, Bits a) => HistogramConfig a -> Index -> Range a Source #
The range of possible values represented by this Index
bitLength :: FiniteBits b => b -> Int Source #
The number of bits required to represent this data, disregarding leading zeros