#include <TFCS1DFunctionTemplateHelpers.h>
template<typename T, typename Trandom = float>
TFCS1DFunction_HistogramBinEdges class
Contents
Public types
-
using size_t = TFCS1DFunction_
size_ t - using value_type = T
- using random_type = Trandom
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) - set position of lower edge of bins
-
auto GetBinLowEdge(size_
t pos) const -> const T& - get position of lower edge of bins
-
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 Trandom>
T TFCS1DFunction_ HistogramBinEdges<T, Trandom>:: position_lin(size_ t pos,
Trandom m,
const Trandom& drnd) const
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 Trandom>
T TFCS1DFunction_ HistogramBinEdges<T, 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]);