1 | #include <Utils/Statistics.hh> |
---|
2 | #include <Utils/utils.hh> |
---|
3 | using namespace Statistics; |
---|
4 | |
---|
5 | template <class T> |
---|
6 | void Statistics::StatsContainer<T>::calculate(T *array, long size) |
---|
7 | { |
---|
8 | findNormalStats(array, size, this->mean, this->stddev); |
---|
9 | findMedianStats(array, size, this->median, this->madfm); |
---|
10 | this->defined = true; |
---|
11 | } |
---|
12 | template void Statistics::StatsContainer<int>::calculate(int *array, long size); |
---|
13 | template void Statistics::StatsContainer<long>::calculate(long *array, long size); |
---|
14 | template void Statistics::StatsContainer<float>::calculate(float *array, long size); |
---|
15 | template void Statistics::StatsContainer<double>::calculate(double *array, long size); |
---|
16 | //-------------------------------------------------------------------- |
---|
17 | |
---|
18 | template <class T> |
---|
19 | void Statistics::StatsContainer<T>::calculate(T *array, long size, bool *isGood) |
---|
20 | { |
---|
21 | findNormalStats(array, size, isGood, this->mean, this->stddev); |
---|
22 | findMedianStats(array, size, isGood, this->median, this->madfm); |
---|
23 | this->defined = true; |
---|
24 | } |
---|
25 | template void Statistics::StatsContainer<int>::calculate(int *array, long size, bool *isGood); |
---|
26 | template void Statistics::StatsContainer<long>::calculate(long *array, long size, bool *isGood); |
---|
27 | template void Statistics::StatsContainer<float>::calculate(float *array, long size, bool *isGood); |
---|
28 | template void Statistics::StatsContainer<double>::calculate(double *array, long size, bool *isGood); |
---|
29 | |
---|