21namespace Experimental {
116 throw std::invalid_argument(
"nDimensions must be > 0");
137 throw std::invalid_argument(
"number of dimensions not identical in Add");
155 throw std::invalid_argument(
"number of dimensions not identical in Add");
206 return stats.fSumWX /
fSumW;
233 return stats.fSumWX2 /
fSumW - mean * mean;
283 return (
EWX3 - 3 *
EWX2 * mean + 2 * mean * mean * mean) / std::pow(var, 1.5);
321 return (
EWX4 - 4 *
EWX3 * mean + 6 *
EWX2 * mean * mean - 3 * mean * mean * mean * mean) / (var * var) - 3;
325 template <std::size_t
I,
typename... A>
329 if constexpr (
I + 1 <
sizeof...(A)) {
334 template <std::size_t
I, std::size_t
N,
typename... A>
338 if constexpr (
I + 1 <
N) {
358 template <
typename... A>
359 void Fill(
const std::tuple<A...> &args)
362 throw std::invalid_argument(
"invalid number of arguments to Fill");
383 template <
typename... A>
387 throw std::invalid_argument(
"invalid number of arguments to Fill");
414 template <
typename... A>
417 auto t = std::forward_as_tuple(args...);
419 static constexpr std::size_t
N =
sizeof...(A) - 1;
421 throw std::invalid_argument(
"invalid number of arguments to Fill");
424 double w = std::get<N>(t).fValue;
439 fSumW2 *= factor * factor;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Histogram statistics of unbinned values.
void Add(const RHistStats &other)
Add all entries from another statistics object.
void Fill(const std::tuple< A... > &args, RWeight weight)
Fill an entry into this statistics object with a weight.
void FillImpl(const std::tuple< A... > &args)
double ComputeSkewness(std::size_t dim=0) const
Compute the skewness of unbinned values.
void Fill(const A &...args)
Fill an entry into this statistics object.
std::vector< RDimensionStats > fDimensionStats
The sums per dimension.
void Clear()
Clear this statistics object.
void FillImpl(const std::tuple< A... > &args, double w)
void AddAtomic(const RHistStats &other)
Add all entries from another statistics object using atomic instructions.
double fSumW
The sum of weights.
std::size_t GetNDimensions() const
const RDimensionStats & GetDimensionStats(std::size_t dim=0) const
double fSumW2
The sum of weights squared.
void Scale(double factor)
Scale the histogram statistics.
void Fill(const std::tuple< A... > &args)
Fill an entry into this statistics object.
double ComputeNEffectiveEntries() const
Compute the number of effective entries.
double ComputeVariance(std::size_t dim=0) const
Compute the variance of unbinned values.
void Streamer(TBuffer &)
ROOT Streamer function to throw when trying to store an object of this class.
std::uint64_t GetNEntries() const
double ComputeMean(std::size_t dim=0) const
Compute the arithmetic mean of unbinned values.
double ComputeKurtosis(std::size_t dim=0) const
Compute the (excess) kurtosis of unbinned values.
RHistStats(std::size_t nDimensions)
Construct a statistics object.
std::uint64_t fNEntries
The number of entries.
double ComputeStdDev(std::size_t dim=0) const
Compute the standard deviation of unbinned values.
Buffer base class used for serializing objects.
std::enable_if_t< std::is_integral_v< T > > AtomicAdd(T *ptr, T val)
Statistics for one dimension.
void Scale(double factor)
void Add(double x, double w)
void AddAtomic(const RDimensionStats &other)
Add another statistics object using atomic instructions.
void Add(const RDimensionStats &other)
A weight for filling histograms.