bin

Bins data into nbin equal width bins, indexed from 0 to nbin - 1, with 0 being the smallest bin, etc. The values returned are the bin index for each element.

Default return type is ubyte, because in the dstats.infotheory, entropy() and related functions specialize on ubytes, and become substandially faster. However, if you're using more than 255 bins, you'll have to provide a different return type as a template parameter.

Ret[]
bin
(
Ret = ubyte
T
)
(
,
uint nbin
,
Ret[] buf = null
)
if (
isForwardRange!(T) &&
&&
isIntegral!(Ret)
)

Meta