Changeset 1224


Ignore:
Timestamp:
Mar 11, 2008, 7:26:46 PM (13 years ago)
Author:
Peter
Message:

fixing bug in averager_test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/averager_test.cc

    r1214 r1224  
    202202  x(0)=0; x(1)=1; x(2)=2;
    203203  theplu::yat::utility::Vector y(3,0);
    204   x(0)=0; x(1)=0; x(2)=2;
     204  y(0)=0; y(1)=0; y(2)=2;
    205205  add(apw, x.begin(), x.end(), y.begin(), w.begin(), w.begin());
    206206  ap.reset();
     
    317317    suite.ok(false);
    318318    suite.err() << "error correlation" << std::endl;
     319    suite.err() << "unweighted:" << a.correlation() << std::endl;
     320    suite.err() << "weighted:" << b.correlation() << std::endl;
     321    suite.err() << "difference:" << a.correlation()-b.correlation()
     322                << std::endl;
    319323  }
    320324  if ( !equal(a.x_averager(),b.x_averager(),tol,suite)) {
     
    333337           << b.covariance() << std::endl;
    334338  }
    335   if ( test::equal(a.correlation(), b.correlation(), tol) ) {
     339  if ( !test::equal(a.correlation(), b.correlation(), tol) ) {
    336340    suite.ok(false);
    337341    suite.err() << "error correlation" << std::endl;
     342    suite.err() << "a:" << a.correlation() << std::endl;
     343    suite.err() << "b:" << b.correlation() << std::endl;
     344    suite.err() << "difference:" << a.correlation()-b.correlation()
     345                << std::endl;
     346    suite.err() << "tol:" << tol << std::endl;
    338347  }
    339348  if ( !equal(a.x_averager(),b.x_averager(),tol,suite)) {
Note: See TracChangeset for help on using the changeset viewer.