@@ -517,9 +517,12 @@ struct Limits {
517
517
template <typename Iterator> Double_t Mean (Iterator first, Iterator last);
518
518
template <typename Iterator, typename WeightIterator> Double_t Mean (Iterator first, Iterator last, WeightIterator wfirst);
519
519
520
- template <typename T> T *MovMedian (const Long64_t n, T *a, const Long64_t k, Double_t *w = nullptr , Long64_t *work = nullptr );
521
- template <typename T> T *MovMean (const Long64_t n, T *a, const Long64_t k, Double_t *w = nullptr );
522
- template <typename T> Double_t Mode (const Long64_t n, T *a);
520
+ template <typename T>
521
+ T *MovMedian (const Long64_t n, T *a, const Long64_t k, Double_t *w = nullptr , Long64_t *work = nullptr );
522
+ template <typename T>
523
+ T *MovMean (const Long64_t n, T *a, const Long64_t k, Double_t *w = nullptr );
524
+ template <typename T>
525
+ Double_t Mode (const Long64_t n, T *a);
523
526
524
527
template <typename T> Double_t GeomMean (Long64_t n, const T *a);
525
528
template <typename Iterator> Double_t GeomMean (Iterator first, Iterator last);
@@ -1121,7 +1124,7 @@ class Moving {
1121
1124
Long64_t n0;
1122
1125
1123
1126
virtual Double_t GetValue (const Long64_t n, T *a, Double_t *w = nullptr , Long64_t *work = nullptr ) = 0;
1124
- virtual ~Moving () {};
1127
+ virtual ~Moving (){};
1125
1128
1126
1129
Moving (const Long64_t n, T *a, const Long64_t k, Double_t *w = nullptr , Long64_t *work = nullptr )
1127
1130
{
@@ -1178,9 +1181,9 @@ class Moving {
1178
1181
1179
1182
for (Long64_t i = 0 ; i != n0; i++) {
1180
1183
kl = (i < k0 / 2 and i > 0 ) ? i : k0 / 2 ;
1181
- if (i + kr > n0 - 1 ) {
1182
- kr--;
1183
- }
1184
+ if (i + kr > n0 - 1 ) {
1185
+ kr--;
1186
+ }
1184
1187
1185
1188
if (i == 0 ) {
1186
1189
if (k0 > 2 ) {
@@ -1205,7 +1208,7 @@ class MovingMean : public Moving<T> {
1205
1208
1206
1209
Double_t GetValue (const Long64_t n, T *a, Double_t *w = nullptr , Long64_t *work = nullptr )
1207
1210
{
1208
- (void ) work;
1211
+ (void )work;
1209
1212
Double_t mean = TMath::Mean (n, a, w);
1210
1213
return mean;
1211
1214
}
@@ -1214,9 +1217,9 @@ class MovingMean : public Moving<T> {
1214
1217
template <typename T>
1215
1218
T *TMath::MovMean (const Long64_t n, T *a, const Long64_t k, Double_t *w)
1216
1219
{
1217
- if (!a) {
1220
+ if (!a) {
1218
1221
Fatal (" MovMean" , " the array is empty" );
1219
- }
1222
+ }
1220
1223
if (n <= 1 ) {
1221
1224
Fatal (" MovMean" , " the length of the array must be >1" );
1222
1225
}
@@ -1262,7 +1265,7 @@ class MovingMedian : public Moving<T> {
1262
1265
template <typename T>
1263
1266
T *TMath::MovMedian (const Long64_t n, T *a, const Long64_t k, Double_t *w, Long64_t *work)
1264
1267
{
1265
- if (!a) {
1268
+ if (!a) {
1266
1269
Fatal (" MovMedian" , " the array is empty" );
1267
1270
}
1268
1271
if (n <= 1 ) {
@@ -1291,10 +1294,10 @@ T *TMath::MovMedian(const Long64_t n, T *a, const Long64_t k, Double_t *w, Long6
1291
1294
template <typename T>
1292
1295
Double_t TMath::Mode (const Long64_t n, T *a)
1293
1296
{
1294
- if (!a) {
1297
+ if (!a) {
1295
1298
Fatal (" Mode" , " the array is empty" );
1296
- }
1297
- if (n < 1 ) {
1299
+ }
1300
+ if (n < 1 ) {
1298
1301
Fatal (" Mode" , " the length of the array must be >0" );
1299
1302
}
1300
1303
0 commit comments