00001 #ifndef _theplu_yat_normalizer_gauss_
00002 #define _theplu_yat_normalizer_gauss_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "Spearman.h"
00027 #include "yat/utility/iterator_traits.h"
00028
00029 #include <gsl/gsl_cdf.h>
00030
00031 namespace theplu {
00032 namespace yat {
00033 namespace normalizer {
00034
00047 class Gauss
00048 {
00049 public:
00057 template<typename ForwardIterator, typename RandomAccessIterator>
00058 void operator()(ForwardIterator first, ForwardIterator last,
00059 RandomAccessIterator result) const
00060 {
00061 Spearman spearman;
00062 spearman(first, last, result);
00063 RandomAccessIterator end = result + distance(first, last);
00064 utility::iterator_traits<RandomAccessIterator> trait;
00065 while (result != end) {
00066 trait.data(result) = gsl_cdf_ugaussian_Pinv(trait.data(result));
00067 ++result;
00068 }
00069 }
00070
00071
00072 private:
00073 };
00074
00075 }}}
00076 #endif