1 #ifndef _theplu_yat_statistics_smoother_ 2 #define _theplu_yat_statistics_smoother_ 27 #include "yat/utility/concept_check.h" 28 #include "yat/utility/iterator_traits.h" 30 #include <boost/concept_check.hpp> 31 #include <boost/iterator/iterator_concepts.hpp> 37 namespace regression {
40 namespace statistics {
57 const std::vector<double>& values);
70 double xmin,
double xmax,
size_t n);
75 void add(
double x,
double weight=1.0);
80 const std::vector<double>& density(
void)
const;
87 void rescale(
double factor);
97 const std::vector<double>& value(
void)
const;
100 std::vector<double> density_;
103 std::vector<double> x_;
115 template<
typename Iterator>
119 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<Iterator>));
121 while (first!=last) {
132 std::ostream& operator<<(std::ostream& s,
const Smoother&);
data_reference data(Iter iter) const
Definition: iterator_traits.h:440
Concept check for Data Iterator.
Definition: concept_check.h:228
Definition: iterator_traits.h:412
The Department of Theoretical Physics namespace as we define it.
Estimating a distribution in a smooth fashion.
Definition: Smoother.h:47
Interface Class for calculating the weights in a more general way than classical rectangular windows...
Definition: Kernel.h:36
weight_reference weight(Iter iter) const
Definition: iterator_traits.h:446
void add(Smoother &h, Iterator first, Iterator last)
Definition: Smoother.h:116
void add(T &o, ForwardIterator first, ForwardIterator last, const classifier::Target &target)
Definition: utility.h:304
void add(double x, double weight=1.0)
Add a data point.