source: trunk/test/test_statistics.cc @ 196

Last change on this file since 196 was 196, checked in by Jari Häkkinen, 18 years ago

Changed Statistics class to statisics namespace.
Fixed other minor issues.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 401 bytes
Line 
1// $Id: test_statistics.cc 196 2004-10-27 17:45:04Z jari $
2
3// C++ tools include
4////////////////////
5#include "Statistics.h"
6
7// Standard includes
8////////////////////
9#include <vector>
10#include <cstdlib>
11#include <iostream>
12
13
14using namespace std;
15
16int main()
17{ 
18  std::vector<double> data;
19  for (unsigned int i=0; i<10; i++)
20    data.push_back(static_cast<double>(i));
21  double m=theplu::statistics::median(data);
22  if (m!=4.5)
23    return -1;
24  return 0;
25}
Note: See TracBrowser for help on using the repository browser.