2185 |
10 Feb 10 |
peter |
// $Id$ |
2185 |
10 Feb 10 |
peter |
2 |
|
2185 |
10 Feb 10 |
peter |
3 |
/* |
3550 |
03 Jan 17 |
peter |
Copyright (C) 2010, 2012, 2016 Peter Johansson |
2185 |
10 Feb 10 |
peter |
5 |
|
2185 |
10 Feb 10 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
2185 |
10 Feb 10 |
peter |
7 |
|
2185 |
10 Feb 10 |
peter |
The yat library is free software; you can redistribute it and/or |
2185 |
10 Feb 10 |
peter |
modify it under the terms of the GNU General Public License as |
2185 |
10 Feb 10 |
peter |
published by the Free Software Foundation; either version 3 of the |
2185 |
10 Feb 10 |
peter |
License, or (at your option) any later version. |
2185 |
10 Feb 10 |
peter |
12 |
|
2185 |
10 Feb 10 |
peter |
The yat library is distributed in the hope that it will be useful, |
2185 |
10 Feb 10 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2185 |
10 Feb 10 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2185 |
10 Feb 10 |
peter |
General Public License for more details. |
2185 |
10 Feb 10 |
peter |
17 |
|
2185 |
10 Feb 10 |
peter |
You should have received a copy of the GNU General Public License |
2185 |
10 Feb 10 |
peter |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
2185 |
10 Feb 10 |
peter |
20 |
*/ |
2185 |
10 Feb 10 |
peter |
21 |
|
2881 |
18 Nov 12 |
peter |
22 |
#include <config.h> |
2881 |
18 Nov 12 |
peter |
23 |
|
2185 |
10 Feb 10 |
peter |
24 |
#include "Suite.h" |
2185 |
10 Feb 10 |
peter |
25 |
|
2185 |
10 Feb 10 |
peter |
26 |
#include "yat/regression/KernelBox.h" |
2185 |
10 Feb 10 |
peter |
27 |
#include "yat/statistics/Smoother.h" |
2185 |
10 Feb 10 |
peter |
28 |
#include "yat/utility/DataWeight.h" |
3534 |
21 Dec 16 |
peter |
29 |
#include "yat/utility/WeightedIteratorArchetype.h" |
2185 |
10 Feb 10 |
peter |
30 |
|
2185 |
10 Feb 10 |
peter |
31 |
#include <boost/concept_archetype.hpp> |
3514 |
22 Jul 16 |
peter |
32 |
#include <boost/iterator/iterator_archetypes.hpp> |
2185 |
10 Feb 10 |
peter |
33 |
|
2185 |
10 Feb 10 |
peter |
34 |
int main(int argc, char* argv[]) |
2185 |
10 Feb 10 |
peter |
35 |
{ |
2185 |
10 Feb 10 |
peter |
36 |
using namespace theplu::yat; |
2185 |
10 Feb 10 |
peter |
37 |
theplu::yat::test::Suite suite(argc, argv); |
2185 |
10 Feb 10 |
peter |
38 |
|
2185 |
10 Feb 10 |
peter |
39 |
regression::KernelBox kernel; |
2185 |
10 Feb 10 |
peter |
40 |
statistics::Smoother smoother(kernel, 1, 0, 100, 101); |
2185 |
10 Feb 10 |
peter |
41 |
smoother.add(3.14159); |
2185 |
10 Feb 10 |
peter |
42 |
suite.add(smoother.density().size() == 101); |
2185 |
10 Feb 10 |
peter |
43 |
suite.add(smoother.value().size() == 101); |
2185 |
10 Feb 10 |
peter |
44 |
|
2185 |
10 Feb 10 |
peter |
// do not run compiler test |
2185 |
10 Feb 10 |
peter |
46 |
if (false) { |
3514 |
22 Jul 16 |
peter |
47 |
boost::input_iterator_archetype<double> input; |
3514 |
22 Jul 16 |
peter |
48 |
add(smoother, input, input); |
3514 |
22 Jul 16 |
peter |
49 |
typedef boost::iterator_archetypes::readable_iterator_t Access; |
3514 |
22 Jul 16 |
peter |
50 |
typedef boost::single_pass_traversal_tag Traversal; |
3534 |
21 Dec 16 |
peter |
51 |
utility::WeightedIteratorArchetype_ctor_arg dummie; |
3534 |
21 Dec 16 |
peter |
52 |
utility::WeightedIteratorArchetype<Access, Traversal> input2(dummie); |
3514 |
22 Jul 16 |
peter |
53 |
add(smoother, input2, input2); |
2185 |
10 Feb 10 |
peter |
54 |
} |
2185 |
10 Feb 10 |
peter |
55 |
|
2185 |
10 Feb 10 |
peter |
56 |
return suite.return_value(); |
2185 |
10 Feb 10 |
peter |
57 |
} |