Changeset 1445
- Timestamp:
- Aug 28, 2008, 12:53:11 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r1432 r1445 25 25 26 26 #include "yat/normalization/QuantileNormalizer.h" 27 #include "yat/normalization/Centralizer.h" 27 28 28 29 #include "yat/utility/Matrix.h" 29 30 31 #include <vector> 32 30 33 using namespace theplu::yat; 34 void test_centralizer(test::Suite&); 31 35 void test_quantile_normalize(test::Suite&); 32 36 … … 36 40 suite.err() << "testing normalizations ... " << std::endl; 37 41 42 test_centralizer(suite); 38 43 test_quantile_normalize(suite); 39 44 … … 42 47 43 48 49 void test_centralizer(test::Suite& suite) 50 { 51 suite.err() << "Testing Centralizer\n"; 52 std::vector<double> vec; 53 vec.push_back(1); 54 vec.push_back(2); 55 vec.push_back(3); 56 normalization::Centralizer<> c; 57 c(vec.begin(), vec.end(), vec.begin()); 58 for (size_t i=0; i<vec.size(); ++i) 59 suite.add(suite.equal(vec[i], static_cast<double>(i)-1.0)); 60 } 61 62 44 63 void test_quantile_normalize(test::Suite& suite) 45 64 { 46 suite.err() << "Testing quantile normalization\n";65 suite.err() << "Testing QuantileNormalizer\n"; 47 66 48 67 utility::Matrix m(2,2); -
trunk/yat/normalization/Makefile.am
r1432 r1445 29 29 include_normalizationdir = $(includedir)/yat/normalization 30 30 31 include_normalization_HEADERS = QuantileNormalizer.h31 include_normalization_HEADERS = Centralizer.h QuantileNormalizer.h -
trunk/yat/normalization/QuantileNormalizer.h
r1432 r1445 1 #ifndef _theplu_yat_normalization_quantile_normaliz ation_2 #define _theplu_yat_normalization_quantile_normaliz ation_1 #ifndef _theplu_yat_normalization_quantile_normalizer_ 2 #define _theplu_yat_normalization_quantile_normalizer_ 3 3 4 4 /* -
trunk/yat/statistics/Average.h
r1339 r1445 44 44 \return average of range 45 45 */ 46 template<typename ForwardIterator>47 inline double operator()( ForwardIterator first, ForwardIterator last) const46 template<typename InputIterator> 47 inline double operator()(InputIterator first, InputIterator last) const 48 48 { 49 typename averager< ForwardIterator>::type a;49 typename averager<InputIterator>::type a; 50 50 add(a, first, last); 51 51 return a.mean(); -
trunk/yat/statistics/Averager.h
r1437 r1445 184 184 185 185 /** 186 \brief adding a range sof values to Averager \a a186 \brief adding a range of values to Averager \a a 187 187 */ 188 188 template <typename Iter>
Note: See TracChangeset
for help on using the changeset viewer.