Ignore:
Timestamp:
May 9, 2008, 9:42:31 PM (13 years ago)
Author:
Jari Häkkinen
Message:

Fixes #361

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4-stable/test/averager_test.cc

    r1290 r1291  
    209209  delete ap2;
    210210
     211  for (int i=0; i<8; i++)
     212    ap.add(static_cast<double>(i),i,-1);
     213  if (std::abs(ap.correlation()-1)>tol) {
     214    suite.add(false);
     215    suite.err() << "correlation after removal of data: " << ap.correlation()
     216                << std::endl;
     217    suite.err() << "error: correlation between identical vectors is unity"
     218                << std::endl;
     219  }
     220  ap.add(static_cast<double>(1),1,-4);
     221  if (std::abs(ap.correlation()+1)>tol || ap.n()!=-2) {
     222    suite.add(false);
     223    suite.err() << "AveragerPair error: add with negatibe n\n";
     224  }
     225
     226
    211227  suite.out() << "testing AveragerPairWeighted" << std::endl;
    212228  AveragerPairWeighted apw;
Note: See TracChangeset for help on using the changeset viewer.