1 | #include <Utils/Statistics.hh> |
---|
2 | #include <Utils/utils.hh> |
---|
3 | using namespace Statistics; |
---|
4 | |
---|
5 | template <class T> Statistics::StatsContainer<T>::StatsContainer(const StatsContainer<T>& s) |
---|
6 | { |
---|
7 | this->defined = s.defined; |
---|
8 | this->mean = s.mean; |
---|
9 | this->stddev = s.stddev; |
---|
10 | this->median = s.median; |
---|
11 | this->madfm = s.madfm; |
---|
12 | this->threshold = s.threshold; |
---|
13 | this->pThreshold = s.pThreshold; |
---|
14 | this->useRobust = s.useRobust; |
---|
15 | this->useFDR = s.useFDR; |
---|
16 | } |
---|
17 | template StatsContainer<int>::StatsContainer(const StatsContainer<int>& s); |
---|
18 | template StatsContainer<long>::StatsContainer(const StatsContainer<long>& s); |
---|
19 | template StatsContainer<float>::StatsContainer(const StatsContainer<float>& s); |
---|
20 | template StatsContainer<double>::StatsContainer(const StatsContainer<double>& s); |
---|
21 | //-------------------------------------------------------------------- |
---|
22 | |
---|
23 | template <class T> Statistics::StatsContainer<T>& StatsContainer<T>::operator= (const StatsContainer<T>& s) |
---|
24 | { |
---|
25 | this->defined = s.defined; |
---|
26 | this->mean = s.mean; |
---|
27 | this->stddev = s.stddev; |
---|
28 | this->median = s.median; |
---|
29 | this->madfm = s.madfm; |
---|
30 | this->threshold = s.threshold; |
---|
31 | this->pThreshold = s.pThreshold; |
---|
32 | this->useRobust = s.useRobust; |
---|
33 | this->useFDR = s.useFDR; |
---|
34 | } |
---|
35 | template StatsContainer<int>& StatsContainer<int>::operator= (const StatsContainer<int>& s); |
---|
36 | template StatsContainer<long>& StatsContainer<long>::operator= (const StatsContainer<long>& s); |
---|
37 | template StatsContainer<float>& StatsContainer<float>::operator= (const StatsContainer<float>& s); |
---|
38 | template StatsContainer<double>& StatsContainer<double>::operator= (const StatsContainer<double>& s); |
---|
39 | //-------------------------------------------------------------------- |
---|
40 | |
---|
41 | template <class T> void Statistics::StatsContainer<T>::calculate(T *array, long size) |
---|
42 | { |
---|
43 | findNormalStats(array, size, this->mean, this->stddev); |
---|
44 | findMedianStats(array, size, this->median, this->madfm); |
---|
45 | this->defined = true; |
---|
46 | } |
---|
47 | template void Statistics::StatsContainer<int>::calculate(int *array, long size); |
---|
48 | template void Statistics::StatsContainer<long>::calculate(long *array, long size); |
---|
49 | template void Statistics::StatsContainer<float>::calculate(float *array, long size); |
---|
50 | template void Statistics::StatsContainer<double>::calculate(double *array, long size); |
---|
51 | //-------------------------------------------------------------------- |
---|
52 | |
---|
53 | template <class T> |
---|
54 | void Statistics::StatsContainer<T>::calculate(T *array, long size, bool *isGood) |
---|
55 | { |
---|
56 | findNormalStats(array, size, isGood, this->mean, this->stddev); |
---|
57 | findMedianStats(array, size, isGood, this->median, this->madfm); |
---|
58 | this->defined = true; |
---|
59 | } |
---|
60 | template void Statistics::StatsContainer<int>::calculate(int *array, long size, bool *isGood); |
---|
61 | template void Statistics::StatsContainer<long>::calculate(long *array, long size, bool *isGood); |
---|
62 | template void Statistics::StatsContainer<float>::calculate(float *array, long size, bool *isGood); |
---|
63 | template void Statistics::StatsContainer<double>::calculate(double *array, long size, bool *isGood); |
---|
64 | |
---|