IMP logo
Public Types | Public Member Functions
IMP::statistics::HistogramD< D, Grid > Class Template Reference

Detailed Description

template<int D, class Grid = algebra::GridD<D, typename algebra::DenseGridStorageD<D, double>, double, typename algebra::DefaultEmbeddingD<D> >>
class IMP::statistics::HistogramD< D, Grid >

Dynamically build a histogram embedded in D-dimensional space.

List of all members.

Public Types

typedef Grid CountGrid

Public Member Functions

 HistogramD (double voxel_size, const algebra::BoundingBoxD< D > &bb)
void add (const algebra::VectorD< D > &x, double weight=1)
 Increase the count for the bin that holds a.
algebra::BoundingBoxD< D > get_bounding_box () const
CountGrid get_counts () const
unsigned int get_dimension () const
HistogramD< D > get_frequencies () const
algebra::VectorD< D > get_mean () const
FloatPair get_minimum_and_maximum () const
HistogramD< D > get_probability_distribution_function () const
algebra::VectorD< D > get_standard_deviation (const algebra::VectorD< D > &mean) const
double get_total_count () const
 Get the sum of all counts in the histogram.
void show (std::ostream &out=std::cout) const

Python only

This functionality is only available in python.

void show_histogram (HistogramD h, std::string xscale="linear", std::string yscale="linear", Functions curves=Functions())

Additional Inherited Members


Member Function Documentation

template<int D, class Grid = algebra::GridD<D, typename algebra::DenseGridStorageD<D, double>, double, typename algebra::DefaultEmbeddingD<D> >>
void IMP::statistics::HistogramD< D, Grid >::add ( const algebra::VectorD< D > &  x,
double  weight = 1 
)

Increase the count for the bin that holds a.

template<int D, class Grid = algebra::GridD<D, typename algebra::DenseGridStorageD<D, double>, double, typename algebra::DefaultEmbeddingD<D> >>
HistogramD<D> IMP::statistics::HistogramD< D, Grid >::get_probability_distribution_function ( ) const

Get a histogram that has the pdf value as the value for the bin.

template<int D, class Grid = algebra::GridD<D, typename algebra::DenseGridStorageD<D, double>, double, typename algebra::DefaultEmbeddingD<D> >>
double IMP::statistics::HistogramD< D, Grid >::get_total_count ( ) const

Get the sum of all counts in the histogram.


Friends And Related Function Documentation

template<int D, class Grid = algebra::GridD<D, typename algebra::DenseGridStorageD<D, double>, double, typename algebra::DefaultEmbeddingD<D> >>
void show_histogram ( HistogramD< D, Grid >  h,
std::string  xscale = "linear",
std::string  yscale = "linear",
Functions  curves = Functions() 
)
related

In python, you can use matplot lib, if installed, to show the contents of a histogram. At the moment, only 1D and 2D histograms are supported.

Parameters:
[in]hThe histogram to show, the plot is sized to the histograms bounding box.
[in]xscaleWhether the xscale is "linear" or "log"
[in]yscaleWhether the yscale is "linear" or "log"
[in]curvesA list of python functions to plot on the histogram as curves. The functions should take one float and return a float.

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

Generated on Tue May 22 2012 23:33:37 for IMP by doxygen 1.8.1