template<typename T, typename Tint, typename Trandom = float>
TFCS1DFunction_HistogramCompactBinEdges class

Public types

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

Constructors, destructors, conversion operators

TFCS1DFunction_HistogramCompactBinEdges(size_t nbins = 0)
~TFCS1DFunction_HistogramCompactBinEdges()

Public functions

auto MemorySizeArray() const -> std::size_t
auto MemorySize() const -> std::size_t
void set_nbins(size_t nbins)
set number of bins
auto get_nbins() const -> size_t
return number of bins
void SetBinLowEdge(size_t pos, const T& value)
auto GetBinLowEdge(size_t pos) const -> const T
auto GetBinLength(size_t pos) const -> const T
get the length of a bin
void SetMin(const T& value)
set and get minimum
auto GetMin() const -> const T&
void SetMax(const T& value)
set and get maximum
auto GetMax() const -> const T&
void SetMinMax(const T& valuemin, const T& valuemax)
set minimum and maximum
auto Length() const -> const T
Get length of interval of all bins.
auto position(size_t pos, const Trandom& drnd) const -> T
auto position_lin(size_t pos, Trandom m, const Trandom& drnd) const -> T
auto position_exp(size_t pos, Trandom beta, const Trandom& drnd) const -> T

Function documentation

template<typename T, typename Tint, typename Trandom>
void TFCS1DFunction_HistogramCompactBinEdges<T, Tint, Trandom>::SetBinLowEdge(size_t pos, const T& value)

set position of lower edge of bins. Requires GetMin() and GetMax() to be set and may not be changed!

template<typename T, typename Tint, typename Trandom>
const T TFCS1DFunction_HistogramCompactBinEdges<T, Tint, Trandom>::GetBinLowEdge(size_t pos) const

get position of lower edge of bins. Requires GetMin() and GetMax() to be set and may not be changed!

template<typename T, typename Tint, typename Trandom>
T TFCS1DFunction_HistogramCompactBinEdges<T, Tint, Trandom>::position(size_t pos, const Trandom& drnd) const

return linear interpolated position for bin pos. Interpolation is done with a random value in the range [0,1]

template<typename T, typename Tint, typename Trandom>
T TFCS1DFunction_HistogramCompactBinEdges<T, Tint, Trandom>::position_lin(size_t pos, Trandom m, const Trandom& drnd) const

return interpolated position for bin pos, such that histograming the position gives a linear slope m, where m is in units of the bin width for bin pos. Interpolation is done with a random value in the range [0,1] return linearly interpolated position for bin pos, such that histograming the position gives a linear slope m, where m is in units of the bin width for bin pos. Interpolation is done with a random value in the range [0,1]

template<typename T, typename Tint, typename Trandom>
T TFCS1DFunction_HistogramCompactBinEdges<T, Tint, Trandom>::position_exp(size_t pos, Trandom beta, const Trandom& drnd) const

return exponentially interpolated position for bin pos, such that histograming the position gives a linear slope m, where m is in units of the bin width for bin pos. Interpolation is done with a random value in the range [0,1]

(m_array[pos+1] - m_array[pos]);