template<typename T, typename Trandom = float>
TFCS1DFunction_HistogramContent class

Public types

using size_t = TFCS1DFunction_size_t
using value_type = T
using random_type = Trandom

Constructors, destructors, conversion operators

TFCS1DFunction_HistogramContent(size_t nbins = 0)

Public functions

auto MemorySizeArray() const -> std::size_t
auto MemorySize() const -> std::size_t
void set_fraction(size_t pos, Trandom value)
auto get_fraction(size_t pos) const -> Trandom
Get the cumulative content at bin pos as fraction in the range [0,1].
auto get_binfraction(size_t pos) const -> Trandom
Get the content at bin pos as fraction in the range [0,1].
void set_nbins(size_t nbins)
auto get_nbins() const -> size_t
auto get_bin(Trandom drnd, Trandom& residual_rnd) const -> size_t

Function documentation

template<typename T, typename Trandom>
void TFCS1DFunction_HistogramContent<T, Trandom>::set_fraction(size_t pos, Trandom value)

Set the content of bin pos to a given value, where value is in the range [0,1]

template<typename T, typename Trandom>
void TFCS1DFunction_HistogramContent<T, Trandom>::set_nbins(size_t nbins)

set number of bins. The actually allocated size is one smaller than count, as the last bin is fixed with the range [get_fraction(size()-1,1]

template<typename T, typename Trandom>
size_t TFCS1DFunction_HistogramContent<T, Trandom>::get_nbins() const

return number of bins. This is one larger than size, as the last bin is fixed with the range [get_fraction(size()-1,1]

template<typename T, typename Trandom>
size_t TFCS1DFunction_HistogramContent<T, Trandom>::get_bin(Trandom drnd, Trandom& residual_rnd) const

Get the matching bin for a given random value in the range [0,1). A residual random number to calculate a position inside this bin is returned in residual_rnd