Skip to content

Commit eeb6197

Browse files
committed
[TMath] Add descriptions for MovMedian, MovMean and Mode
1 parent 04c98d2 commit eeb6197

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

math/mathcore/inc/TMath.h

+25-2
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,16 @@ Double_t TMath::Mean(Long64_t n, const T *a, const Double_t *w)
11001100
}
11011101

11021102
////////////////////////////////////////////////////////////////////////////////
1103-
/// Returns the moving mean of an array with a length n.
1103+
/// Returns the moving mean of an array.
1104+
///
1105+
/// \param[in] n number of array elements
1106+
/// \param[in] *a array
1107+
/// \param[in] k window size
1108+
/// \param[in] *w weight of the array values
1109+
///
1110+
/// The mean values will be calculated over the window value
1111+
/// for each entry a[i] of the array. The function will return
1112+
/// weighted moving mean if the weight argument is provided.
11041113

11051114
template <typename T>
11061115
class Moving {
@@ -1222,7 +1231,18 @@ T *TMath::MovMean(Long64_t n, T *a, Long64_t k, Double_t *w)
12221231
}
12231232

12241233
////////////////////////////////////////////////////////////////////////////////
1225-
/// Returns the moving median of an array with a length n.
1234+
/// Returns the moving median of an array.
1235+
///
1236+
/// \param[in] n number of array elements
1237+
/// \param[in] *a array
1238+
/// \param[in] k window size
1239+
/// \param[in] *w weight of the array values
1240+
/// \param[in] *work work
1241+
///
1242+
/// The median values will be calculated over the window
1243+
/// value for each entry a[i] of the array. The function will
1244+
/// return weighted moving median if the weight argument
1245+
/// is provided.
12261246

12271247
template <typename T>
12281248
class MovingMedian : public Moving<T> {
@@ -1258,6 +1278,9 @@ T *TMath::MovMedian(Long64_t n, T *a, Long64_t k, Double_t *w, Long64_t *work)
12581278
////////////////////////////////////////////////////////////////////////////////
12591279
/// Returns the mode of an array. If there are an equal amount of
12601280
/// different values, the smallest value will be returned.
1281+
///
1282+
/// \param[in] n number of array elements
1283+
/// \param[in] *a array
12611284

12621285
template <typename T>
12631286
Double_t TMath::Mode(const Long64_t n, T *a)

0 commit comments

Comments
 (0)