Last change
on this file since 301 was
301,
checked in by Peter, 18 years ago
|
modified includes in tests
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
335 bytes
|
Line | |
---|
1 | // $Id: statistics_test.cc 301 2005-04-30 13:39:27Z peter $ |
---|
2 | |
---|
3 | #include <c++_tools/statistics/utility.h> |
---|
4 | |
---|
5 | #include <vector> |
---|
6 | #include <cstdlib> |
---|
7 | #include <iostream> |
---|
8 | |
---|
9 | |
---|
10 | using namespace std; |
---|
11 | |
---|
12 | int main() |
---|
13 | { |
---|
14 | std::vector<double> data; |
---|
15 | for (unsigned int i=0; i<10; i++) |
---|
16 | data.push_back(static_cast<double>(i)); |
---|
17 | double m=theplu::statistics::median(data); |
---|
18 | if (m!=4.5) |
---|
19 | return -1; |
---|
20 | return 0; |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.