Ignore:
Timestamp:
Sep 24, 2007, 9:52:03 PM (16 years ago)
Author:
Peter
Message:

made add function template so it accepts AveragerWeighted? too. Also added some tests #refs 246

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/averager_test.cc

    r865 r887  
    3434#include <limits>
    3535#include <iostream>
     36#include <set>
    3637
    3738using namespace theplu::yat::statistics;
     
    122123    *error << "variance(mean) " << a.variance(a.mean()) << std::endl;
    123124  }
     125  theplu::yat::utility::vector* tmp_vec = new theplu::yat::utility::vector(10);
     126  add(a, tmp_vec->begin(), tmp_vec->end());
     127  delete tmp_vec;
     128  std::set<double>* tmp_set = new std::set<double>;
     129  tmp_set->insert(1.0);
     130  tmp_set->insert(2.0);
     131  add(a, tmp_set->begin(), tmp_set->end());
     132  delete tmp_set;
     133
    124134
    125135  // Testing AveragerWeighted
     
    163173  }
    164174  delete aw2;
     175  {
     176    theplu::yat::utility::vector tmp(10);
     177    add(aw, tmp.begin(), tmp.end());
     178  }
     179  {
     180    std::set<double> tmp;
     181    tmp.insert(1.0);
     182    tmp.insert(2.0);
     183    add(aw, tmp.begin(), tmp.end());
     184  }
    165185 
    166186
Note: See TracChangeset for help on using the changeset viewer.