Last change
on this file since 116 was
116,
checked in by Peter, 18 years ago
|
test_crossvalidation and test_statistics added
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
422 bytes
|
Line | |
---|
1 | // $Id: test_statistics.cc 116 2004-07-19 14:40:11Z peter $ |
---|
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 | |
---|
14 | using namespace std; |
---|
15 | |
---|
16 | int main() |
---|
17 | { |
---|
18 | std::vector<double> data; |
---|
19 | theplu::cpptools::Statistics stat; |
---|
20 | for (unsigned int i=0; i<10; i++) |
---|
21 | data.push_back(static_cast<double>(i)); |
---|
22 | double m=stat.median(data); |
---|
23 | if (m!=4.5) |
---|
24 | return -1; |
---|
25 | return 0; |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.