1 #ifndef _theplu_yat_statistics_histogram_ 2 #define _theplu_yat_statistics_histogram_ 29 #include "AveragerWeighted.h" 30 #include "yat/utility/concept_check.h" 31 #include "yat/utility/iterator_traits.h" 33 #include <boost/concept_check.hpp> 34 #include <boost/iterator/iterator_concepts.hpp> 42 namespace statistics {
103 int add(
const double x,
const double weight=1.0);
190 double xmax(
void)
const;
197 double xmin(
void)
const;
221 size_t bin(
double d);
223 std::vector<double> histogram_;
239 template<
typename Iterator>
242 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<Iterator>));
245 while (first!=last) {
256 std::ostream& operator<<(std::ostream& s,
const Histogram&);
void add(Histogram &h, Iterator first, Iterator last)
Definition: Histogram.h:240
void normalize(bool choice=true)
Normalizing the histogram.
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.
double operator[](size_t k) const
int add(const double x, const double weight=1.0)
Add a data point to the histogram.
Class to calulate averages with weights.
Definition: AveragerWeighted.h:66
const Histogram & operator=(const Histogram &)
const AveragerWeighted & averager_histogram(void) const
Average of events fitting within histogram.
const AveragerWeighted & averager_all(void) const
Average of all events presented to the histogram.
double spacing(void) const
Histograms provide a convenient way of presenting the distribution of a set of data.
Definition: Histogram.h:53
const Histogram & operator+=(const Histogram &rhs)
Addition operator.
double observation_value(const size_t k) const
weight_reference weight(Iter iter) const
Definition: iterator_traits.h:446
size_t nof_bins(void) const
void rescale(double factor)