Ignore:
Timestamp:
Sep 26, 2007, 3:44:19 PM (16 years ago)
Author:
Markus Ringnér
Message:

A first suggestion for how to adress #250. Also removed contamination of namespace std (see #251).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/iterator_test.cc

    r883 r898  
    2424#include "yat/classifier/DataLookup1D.h"
    2525
     26#include "yat/classifier/DataLookupWeighted1D.h"
     27#include "yat/classifier/MatrixLookupWeighted.h"
    2628#include "yat/utility/Iterator.h"
     29#include "yat/utility/IteratorWeighted.h"
     30#include "yat/utility/matrix.h"
    2731#include "yat/utility/vector.h"
    2832
     
    6367  std::sort(begin, end);
    6468
     69  // test std algorithm on IteratorWeighted
     70  utility::matrix m(1,3,1);
     71  m(0,1)=2.0;
     72  utility::matrix w(1,3,1);
     73  classifier::MatrixLookupWeighted mw(m,w);
     74  classifier::DataLookupWeighted1D aw(mw,0,true);
     75  size_t nof1=std::count(aw.begin(),aw.end(),1.0);
     76  if(nof1!=2) {
     77    *message << "std algoritm with IteratorWeighted failed" << std::endl;
     78    ok=false;
     79  }
     80
    6581  if (!ok)
    6682    *message << "iterator test failed" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.