Public Member Functions
clipper::Histogram Class Reference

General histogram class. More...

#include <clipper_stats.h>

Inheritance diagram for clipper::Histogram:
clipper::Range_sampling clipper::Range< ftype >

List of all members.

Public Member Functions

 Histogram ()
 null constructor
 Histogram (const Range< ftype > &range, const int &n)
 constructor: from range and sampling
void accumulate (const ftype &x)
 add value to histogram (if it is in range)
void accumulate (const ftype &x, const ftype &w)
 add specified value to histogram (if it is in range)
ftype sum () const
 return sum of whole histogram
const ftypey (const int &i) const
 return value at index in histogram (Note: no bound check on i)
ftype y (const ftype &x) const
 return value at interpolated position in histogram
const Histogramoperator+= (const Histogram &h)
 add the contents of two histograms (size must match)
ftype x (const int &i) const
 return x-value corresponding to centre of i'th range
ftype x_min (const int &i) const
 return x-value corresponding to bottom of i'th range
ftype x_max (const int &i) const
 return x-value corresponding to top of i'th range
int size () const
 return number of samplings in range

Detailed Description

General histogram class.

This class is used to accumulate and access a histogram of values spread over a specified range. On storing data or retrieving by interpolation the range is checked.

The documentation for this class was generated from the following files: