Ignore:
Timestamp:
May 12, 2008, 10:21:19 AM (14 years ago)
Author:
Jari Häkkinen
Message:

Reverting changes that break the interface of Averager and AveragerPair? classes.

File:
1 edited

Legend:

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

    r1291 r1294  
    6969    suite.add(false);
    7070    suite.err() << "error: add\n";
    71   }
    72   Averager b(a);
    73   b.add(5,-1);
    74   if (b.n()!=2 || b.mean()!=2 || b.sum_xx()!=10){
    75     suite.add(false);
    76     suite.err() << "error: add with negative n\n";
    77   }
    78   b.add(5,-4);
    79   if (b.n()!=-2 || b.mean()!=8 || b.sum_xx()!=-90){
    80     suite.add(false);
    81     suite.err() << "error: add with negatibe n\n";
    8271  }
    8372
     
    209198  delete ap2;
    210199
    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 
    227200  suite.out() << "testing AveragerPairWeighted" << std::endl;
    228201  AveragerPairWeighted apw;
Note: See TracChangeset for help on using the changeset viewer.