#include <TFCS1DFunctionTemplateHelpers.h>
template<typename T, typename Trandom = float>
TFCS1DFunction_HistogramContent class
Contents
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>
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