KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
kjb::Histogram Class Reference

A class that represents a histogram of data. ATM, the data must be doubles. More...

#include <prob_histogram.h>

Public Member Functions

template<class InputIterator >
 Histogram (InputIterator first, InputIterator last, int num_bins)
 Create a histogram from data with the given number of bins. More...
 
int num_bins () const
 Return the number of bins of this histogram. More...
 
double bin_size () const
 Return the bin size of this histogram. More...
 
const std::map< double, int > & as_map () const
 Return a vector of the bins, represented by their lower bounds. More...
 

Detailed Description

A class that represents a histogram of data. ATM, the data must be doubles.

Constructor & Destructor Documentation

template<class InputIterator >
kjb::Histogram::Histogram ( InputIterator  first,
InputIterator  last,
int  num_bins 
)
inline

Create a histogram from data with the given number of bins.

Member Function Documentation

const std::map<double, int>& kjb::Histogram::as_map ( ) const
inline

Return a vector of the bins, represented by their lower bounds.

double kjb::Histogram::bin_size ( ) const
inline

Return the bin size of this histogram.

int kjb::Histogram::num_bins ( ) const
inline

Return the number of bins of this histogram.


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