source: trunk/test/test_regression_local.cc @ 236

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

modified to suit new interface

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 575 bytes
Line 
1// $Id: test_regression_local.cc 236 2005-02-21 14:54:25Z 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  rl.fit(0.1);
32   
33  if (ok)
34    return 0;
35  return -1;
36}
Note: See TracBrowser for help on using the repository browser.