|
gslmm::histogram< double, size_t > Class Template Reference
[Histograms.]
#include <histogram_1d.hh>
Collaboration diagram for gslmm::histogram< double, size_t >:
[legend]List of all members.
Detailed Description
template<>
class gslmm::histogram< double, size_t >
A 1D histogram class.
|
Public Types |
typedef double | value_type |
typedef size_t | bin_type |
typedef size_t | size_type |
Public Member Functions |
| histogram (const size_type &bins, bool zero=true) |
| histogram (const size_type &bins, const value_type &min, const value_type &max) |
| histogram (const size_type &bins, const value_type *ranges) |
| histogram (const std::vector< value_type > &ranges) |
| histogram (const histogram< value_type, bin_type > &other) |
virtual | ~histogram () |
bool | range (const value_type &min, const value_type &max) |
bool | range (const value_type *ranges) |
bool | range (const std::vector< value_type > &ranges) |
value_type | max () const |
value_type | min () const |
size_type | bins () const |
void | reset () |
bool | fill (const value_type &x) |
bool | fill (const value_type &x, double w) |
double | bin_content (const bin_type &bin) const |
bool | bin_range (const bin_type &bin, value_type &min, value_type &max) const |
value_type | bin_min (const bin_type &bin) const |
value_type | bin_max (const bin_type &bin) const |
bin_type | bin_number (const value_type &x) const |
double | max_content () const |
double | min_content () const |
bin_type | max_content_bin () const |
bin_type | min_content_bin () const |
value_type | mean () const |
value_type | sigma () const |
double | covariance () const |
double | sum () const |
bool | compatible (const histogram< value_type, bin_type > &other) |
const value_type & | operator[] (const bin_type &bin) const |
value_type & | operator[] (const bin_type &bin) |
histogram< value_type, bin_type > & | operator= (const histogram< value_type, bin_type > &other) |
histogram< value_type, bin_type > & | operator+= (const histogram< value_type, bin_type > &other) |
histogram< value_type, bin_type > & | operator-= (const histogram< value_type, bin_type > &other) |
histogram< value_type, bin_type > & | operator *= (const histogram< value_type, bin_type > &other) |
histogram< value_type, bin_type > & | operator/= (const histogram< value_type, bin_type > &other) |
histogram< value_type, bin_type > & | operator+= (value_type x) |
histogram< value_type, bin_type > & | operator-= (value_type x) |
histogram< value_type, bin_type > & | operator *= (value_type x) |
histogram< value_type, bin_type > & | operator/= (value_type x) |
bool | write (FILE *f) const |
bool | read (FILE *f) |
bool | print (FILE *s, const char *r="%g", const char *b="%f") const |
bool | scan (FILE *s) |
Protected Attributes |
gsl_histogram * | _histogram |
Friends |
class | ntuple |
class | pdf |
Classes |
class | pdf |
| Probablity distribution function from a 1D histogram. More...
|
Member Typedef Documentation
Constructor & Destructor Documentation
|
Constructor.
The bin ranges is not set. Set the bin ranges with the member function range. - Parameters:
-
| bins | the number of bins |
| zero | is true , then the bins are zeroed. |
|
|
Constructor.
Construct a histogram with bins bins uniformly distributed between min and max. - Parameters:
-
| bins | The number of bins. |
| min | The minimum of the range. |
| max | The maximum of the range. Must be larger than min. |
|
|
Constructor Create a histogram with bins, with the (variable) ranges given by ranges.
For example: This will allocate a histogram with 3 bins, distributed between 1 and 1000 logarithimicly - Parameters:
-
| bins | The number of bins |
| ranges | Array of bins + 1 ranges. The limits must be in increasing order. |
|
|
Constructor Allocates a histogram with bins, where is ranges.size() - 1.
For example: This makes a histogram with the bins - Parameters:
-
| ranges | Array of the bin limits. |
|
Member Function Documentation
|
Get bin number corresponding to x and y.
|
|
Check if to histograms have compatible ranges.
|
|
Increment a bin with a weight.
|
|
Get the maximum of the range.
|
|
Get the value of the maximal bin.
|
|
Get the bin number of the maximal bin.
|
|
Get the mean of the histogram.
|
|
Get the minimum of the range.
|
|
Get the value of the minimal bin.
|
|
Get the bin number of the minimal bin.
|
|
Scale this histogram with a constant.
|
|
Multiply by the contents of a compatible histogram.
|
|
Add a constant to the bins.
|
|
Add the contents of a compatible histogram.
|
|
Subtract a constant from this histogram.
|
|
Subtract the contents of a compatible histogram.
|
|
Scale this histogram with a constant.
|
|
Divide with the contents of a compatible histogram.
|
|
Assign one histogram to another.
|
bool gslmm::histogram< double, size_t >::print |
( |
FILE * |
s, |
|
|
const char * |
r = "%g" , |
|
|
const char * |
b = "%f" |
|
) |
const [inline] |
|
|
print to a (C) stream.
- Parameters:
-
| s | The stream to print on. |
| r | The format of the write for the ranges. |
| b | The format of the write for the bins. |
- Returns:
true on success, false otherwise
|
|
Read into this object from a (C) file.
- Parameters:
-
| f | The (C) file to read from. |
- Returns:
true on success, false otherwise
|
|
Read into this object from a (C) stream.
- Parameters:
-
- Returns:
true on success, false otherwise
|
|
Get the spread of the histogram.
|
|
Get the sum of the histogram.
|
|
Write this object to a (C) file.
- Parameters:
-
| f | The (C) file to write to |
- Returns:
true on success, false otherwise
|
Friends And Related Function Documentation
friend class pdf [friend] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
|