source: trunk/test/test_regression_local.cc @ 238

Last change on this file since 238 was 238, checked in by Peter, 17 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 598 bytes
Line 
1// $Id: test_regression_local.cc 238 2005-02-21 16:42:00Z peter $
2
3// C++ tools include
4////////////////////
5#include "RegressionKernelBox.h"
6#include "RegressionLinear.h"
7#include "RegressionLocal.h"
8#include "vector.h"
9
10
11// Standard includes
12////////////////////
13#include <iostream>
14#include <cmath>
15
16using namespace theplu;
17
18int main()
19
20{ 
21  bool ok=true;
22 
23  statistics::RegressionLinear r;
24  statistics::RegressionKernelBox k;
25  statistics::RegressionLocal rl(r,k);
26  for (size_t i=0; i<1000; i++){
27    double x = static_cast<double>(i)/100;
28    double y = sin(x);
29    rl.add(x, y);
30  }
31  std::cout << "Fit\n";
32  rl.fit(0.1);
33   
34  if (ok)
35    return 0;
36  return -1;
37}
Note: See TracBrowser for help on using the repository browser.