#include <TFCS1DFunctionTemplateHelpers.h>
template<typename T, typename Tint, typename Trandom = float>
TFCS1DFunction_HistogramCompactBinEdges class
Contents
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
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_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]);