Changeset 1463 for trunk


Ignore:
Timestamp:
Sep 1, 2008, 11:34:15 PM (13 years ago)
Author:
Peter
Message:

fixing compilation errors

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/normalization_test.cc

    r1447 r1463  
    2424#include "Suite.h"
    2525
     26#include "yat/normalization/Centralizer.h"
     27#include "yat/normalization/ColumnNormalizer.h"
    2628#include "yat/normalization/QuantileNormalizer.h"
    27 #include "yat/normalization/Centralizer.h"
    2829
    2930#include "yat/utility/Matrix.h"
     
    3334using namespace theplu::yat;
    3435void test_centralizer(test::Suite&);
     36void test_column_normalizer(test::Suite&);
    3537void test_quantile_normalize(test::Suite&);
    3638
     
    6163
    6264
     65void test_column_normalize(test::Suite& suite)
     66{
     67  suite.err() << "Testing QuantileNormalizer\n";
     68 
     69  utility::Matrix m(2,2);
     70  m(0,0) = 0;
     71  m(0,1) = 10;
     72  m(1,0) = 2;
     73  m(1,1) = 4;
     74  normalization::QuantileNormalizer qn;
     75  qn(m, m);
     76  suite.err() << "Testing m(0,0)\n";
     77  suite.add(suite.equal(m(0,0), 2));
     78  suite.err() << "Testing m(0,1)\n";
     79  suite.add(suite.equal(m(0,1), 6));
     80  suite.err() << "Testing m(1,0)\n";
     81  suite.add(suite.equal(m(1,0), 6));
     82  suite.err() << "Testing m(1,1)\n";
     83  suite.add(suite.equal(m(1,1), 2));
     84}
     85
    6386void test_quantile_normalize(test::Suite& suite)
    6487{
  • trunk/yat/normalization/ColumnNormalizer.h

    r1462 r1463  
    2323*/
    2424
     25#include "yat/utility/matrix.h"
     26
    2527namespace theplu {
    2628namespace yat {
    27 namespace utility {
    28   class Matrix;
    29 }
    3029namespace normalization {
    3130
     
    4443       functor used to normalize each column
    4544    */
    46     typedef T normalizer_type
     45    typedef T normalizer_type;
    4746
    4847    /**
     
    7372  {
    7473    for (size_t i=0; i<matrix.rows(); ++i)
    75       normalizer_(result.begin_const_column(i), result.end_const_columns(i),
     74      normalizer_(result.begin_column(i), result.end_column(i),
    7675                  result.begin_column(i));
    7776
Note: See TracChangeset for help on using the changeset viewer.