Ignore:
Timestamp:
Sep 21, 2008, 6:53:12 AM (14 years ago)
Author:
Peter
Message:

adding a RowNormalizer?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/normalization_test.cc

    r1512 r1520  
    2626#include "yat/utility/DataIterator.h"
    2727#include "yat/normalizer/QuantileNormalizer.h"
     28#include "yat/normalizer/RowNormalizer.h"
    2829#include "yat/normalizer/Spearman.h"
    2930
     
    4041void test_column_normalize(test::Suite&);
    4142void test_quantile_normalize(test::Suite&);
     43void test_row_normalize(test::Suite&);
    4244void test_spearman(test::Suite&);
    4345void test_spearman_weighted(test::Suite&);
     
    5153  test_column_normalize(suite);
    5254  test_quantile_normalize(suite);
     55  test_row_normalize(suite);
    5356  test_spearman(suite);
    5457
     
    112115  suite.err() << "Testing m(1,1)\n";
    113116  suite.add(suite.equal(m(1,1), 2));
     117}
     118
     119void test_row_normalize(test::Suite& suite)
     120{
     121  using namespace normalizer;
     122  suite.err() << "Testing RowNormalizer\n";
     123 
     124  utility::Matrix m(2,3);
     125  m(0,0) = 0;
     126  m(0,1) = 10;
     127  m(1,0) = 2;
     128  m(1,1) = 4;
     129  utility::Matrix m2(m);
     130  m2.transpose();
     131  ColumnNormalizer<Centralizer<> > cn;
     132  RowNormalizer<Centralizer<> > rn;
     133  cn(m, m);
     134  rn(m2, m2);
     135  m2.transpose();
     136  suite.equal_range(m.begin(), m.end(), m2.begin());
    114137}
    115138
Note: See TracChangeset for help on using the changeset viewer.