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;
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&);
Smoother(const regression::Kernel &, double width, const std::vector< double > &values)
const std::vector< double > & density(void) const
estimated values
Concept check for Data Iterator.
Definition: concept_check.h:240
data_reference data(Iter iter) const
Definition: iterator_traits.h:440
Definition: iterator_traits.h:412
The Department of Theoretical Physics namespace as we define it.
void rescale(double factor)
Estimating a distribution in a smooth fashion.
Definition: Smoother.h:47
const std::vector< double > & value(void) const
values in which distribution is estimated
Interface Class for calculating the weights in a more general way than classical rectangular windows...
Definition: Kernel.h:37
void add(Smoother &h, Iterator first, Iterator last)
Definition: Smoother.h:116
void reset(void)
reset density to zero
weight_reference weight(Iter iter) const
Definition: iterator_traits.h:446
void add(double x, double weight=1.0)
Add a data point.