Histogram

Undocumented in source.
struct Histogram (
T
Flag!"logIndex" logIndex = No.logIndex
) {}

Constructors

this
this(T histMin, T histMax, bin_size_t binSize)
Undocumented in source.

Members

Aliases

bin_size_t
alias bin_size_t = size_t
Undocumented in source.
bin_size_t
alias bin_size_t = T
Undocumented in source.
indexBase
alias indexBase = _binSize
Undocumented in source.

Functions

binCoord
T binCoord(size_t idx)

Calculate the value corresponding to the bin index.

binIdx
size_t binIdx(T value)

Calculate the bin index corresponding to value.

binSize
T binSize()

Calculate the bin size at of bin idx.

binSize
T binSize(size_t idx)

Calculate the bin size at of bin idx.

counts
auto counts()

Calculate the bin index corresponding to value.

densities
auto densities()

Iterates over the histogram bins enumerating the probability densities density.

insert
void insert(T value)

Insert value into this histogram.

insert
void insert(R values)

Insert a range of values into this histogram. This is equivalent to

opApply
int opApply(int delegate(T coord, double density) yield)
int opApply(int delegate(size_t index, T coord, double density) yield)

Iterates over the histogram bins enumerating the probability densities density.

opApply
int opApply(int delegate(T coord, size_t count) yield)
int opApply(int delegate(size_t index, T coord, size_t count) yield)

Iterates over the histogram bins enumerating the counts.

opApplyReverse
int opApplyReverse(int delegate(T coord, double density) yield)
int opApplyReverse(int delegate(size_t index, T coord, double density) yield)

Iterates over the histogram bins enumerating the probability densities density.

opApplyReverse
int opApplyReverse(int delegate(T coord, size_t count) yield)
int opApplyReverse(int delegate(size_t index, T coord, size_t count) yield)

Iterates over the histogram bins enumerating the counts.

percentile
double percentile(double percent, Flag!"excludeOutliers" excludeOutliers)
double percentile(double percent, size_t index, Flag!"excludeOutliers" excludeOutliers)

Returns a value such that roughly percent values in the histogram are smaller than value. The value is linearly interpolated between bin coordinates. The second form stores the bin index such that no more the percent of the values in the histrogram are in the bins up to index (inclusive).

toString
string toString()

Returns a space-separated table of the histogram bins and header lines with totalCount, minValue, maxValue and sum. The header lines begin with a has sign (#) so they may be treated as comments by other programs.

Manifest constants

valueInf
enum valueInf;
Undocumented in source.
valueInf
enum valueInf;
Undocumented in source.
valueSup
enum valueSup;
Undocumented in source.
valueSup
enum valueSup;
Undocumented in source.

Properties

countsWithoutOutliers
inout(size_t[]) countsWithoutOutliers [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
hasOverflowBin
bool hasOverflowBin [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
hasUnderflowBin
bool hasUnderflowBin [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
histMax
const(T) histMax [@property getter]

Values larger than this value are stored in the lower overflow bin.

histMin
const(T) histMin [@property getter]

Values smaller than this value are stored in the lower overflow bin.

maxValue
const(T) maxValue [@property getter]

Largest value stored in this histogram. This is not subject to histMin and histMax.

mean
double mean [@property getter]

Returns the mean of the inserted values.

minValue
const(T) minValue [@property getter]

Smallest value stored in this histogram. This is not subject to histMin and histMax.

numOverflows
size_t numOverflows [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
numUnderflows
size_t numUnderflows [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
sum
const(T) sum [@property getter]

Sum of all values stored in this histogram. This is not subject to histMin and histMax.

totalCount
const(size_t) totalCount [@property getter]

Total number of values stored in this histogram.

Meta