npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
cumulantConversion.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_CUMULANTCONVERSION_HH_
2 #define NPSTAT_CUMULANTCONVERSION_HH_
3 
4 /*!
5 // \file cumulantConversion.hh
6 //
7 // \brief Conversions between cumulants and central moments
8 //
9 // Author: I. Volobouev
10 //
11 // July 2019
12 */
13 
14 namespace npstat {
15  /**
16  // Arrays "cumulants" and "centralMoments" should have at least
17  // maxOrder+1 elements, with cumulants[2] set to the variance.
18  // On exit, centralMoments[0] will be set to 1, and centralMoments[1]
19  // to cumulants[1].
20  //
21  // Currently, maxOrder can not exceed 20.
22  */
23  template<typename Real>
24  void convertCumulantsToCentralMoments(const Real* cumulants,
25  unsigned maxOrder,
26  Real* centralMoments);
27 
28  /**
29  // Arrays "cumulants" and "centralMoments" should have at least
30  // maxOrder+1 elements, with centralMoments[2] set to the variance.
31  // On exit, cumulants[0] will be set to 0, and cumulants[1]
32  // to centralMoments[1].
33  //
34  // Currently, maxOrder can not exceed 20.
35  */
36  template<typename Real>
37  void convertCentralMomentsToCumulants(const Real* centralMoments,
38  unsigned maxOrder,
39  Real* cumulants);
40 }
41 
42 #include "npstat/stat/cumulantConversion.icc"
43 
44 #endif // NPSTAT_CUMULANTCONVERSION_HH_
Definition: AbsArrayProjector.hh:14
void convertCumulantsToCentralMoments(const Real *cumulants, unsigned maxOrder, Real *centralMoments)
void convertCentralMomentsToCumulants(const Real *centralMoments, unsigned maxOrder, Real *cumulants)