Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
numeric::MultiDimensionalHistogram Class Reference

a class for accumulating a histogram of one or more numeric variables More...

#include <MultiDimensionalHistogram.hh>

Public Member Functions

 MultiDimensionalHistogram ()
 Constructor. More...
 
 MultiDimensionalHistogram (numeric::Size num_dims)
 
 ~MultiDimensionalHistogram ()
 Destructor. More...
 
 MultiDimensionalHistogram (MultiDimensionalHistogram const &mdhist)
 Copy constructor. More...
 
MultiDimensionalHistogramoperator= (MultiDimensionalHistogram const &rhs)
 operator= More...
 
numeric::Size num_dimensions () const
 
void num_dimensions (numeric::Size num)
 
utility::vector1< numeric::Sizenum_bins () const
 
void num_bins (numeric::Size num_bins)
 
void num_bins (utility::vector1< numeric::Size > const &num_bins1)
 
void num_bins (numeric::Size dim, numeric::Size num_bins)
 
void start (numeric::Real start)
 
utility::vector1< numeric::Realstart () const
 
void start (utility::vector1< numeric::Real > const &start1)
 
void start (numeric::Size dim, numeric::Real start)
 
utility::vector1< numeric::Realend () const
 
void end (numeric::Real end)
 
void end (utility::vector1< numeric::Real > const &end1)
 
void end (numeric::Size dim, numeric::Real end)
 
void range (numeric::Size dim, numeric::Real start, numeric::Real end)
 
void set_dimension (numeric::Size dim, numeric::Size num_bins, numeric::Real start, numeric::Real end, std::string label="")
 
std::string const & label () const
 
void label (std::string const &label)
 
utility::vector1< std::string > dim_labels () const
 
void dim_labels (utility::vector1< std::string > const &dim_labels1)
 
void reset_counts ()
 
void record (utility::vector1< numeric::Real > const &values)
 
void record (numeric::Real value)
 
utility::vector0
< numeric::Size > const & 
counts () const
 
numeric::Size total_counts () const
 
MultiDimensionalHistogram collapse (utility::vector1< numeric::Size > dimensions) const
 
numeric::Real mean_squared_error (utility::vector1< utility::vector1< numeric::Real > > const &expected_1d_frequencies)
 

Private Member Functions

void resize_counts ()
 
numeric::Size bin_index (numeric::Size dim, numeric::Real value) const
 
numeric::Size bin_index (utility::vector1< numeric::Real > const &values) const
 
numeric::Size bin_index (utility::vector0< numeric::Size > const &indices) const
 

Private Attributes

utility::vector0< numeric::Sizenum_bins_
 
utility::vector0< numeric::Realstart_
 
utility::vector0< numeric::Realend_
 
std::string label_
 
utility::vector0< std::string > dim_labels_
 
numeric::Size total_counts_
 
utility::vector0< numeric::Sizecounts_
 

Detailed Description

a class for accumulating a histogram of one or more numeric variables

Constructor & Destructor Documentation

numeric::MultiDimensionalHistogram::MultiDimensionalHistogram ( )
inline

Constructor.

References num_dimensions().

numeric::MultiDimensionalHistogram::MultiDimensionalHistogram ( numeric::Size  num_dims)
inline

References num_dimensions().

numeric::MultiDimensionalHistogram::~MultiDimensionalHistogram ( )
inline

Destructor.

numeric::MultiDimensionalHistogram::MultiDimensionalHistogram ( MultiDimensionalHistogram const &  mdhist)
inline

Copy constructor.

Member Function Documentation

numeric::Size numeric::MultiDimensionalHistogram::bin_index ( numeric::Size  dim,
numeric::Real  value 
) const
inlineprivate
numeric::Size numeric::MultiDimensionalHistogram::bin_index ( utility::vector1< numeric::Real > const &  values) const
inlineprivate
numeric::Size numeric::MultiDimensionalHistogram::bin_index ( utility::vector0< numeric::Size > const &  indices) const
inlineprivate
MultiDimensionalHistogram numeric::MultiDimensionalHistogram::collapse ( utility::vector1< numeric::Size dimensions) const
inline
utility::vector0<numeric::Size> const& numeric::MultiDimensionalHistogram::counts ( ) const
inline

References counts_.

Referenced by numeric::operator<<().

utility::vector1<std::string> numeric::MultiDimensionalHistogram::dim_labels ( ) const
inline

References dim_labels_.

Referenced by numeric::operator<<().

void numeric::MultiDimensionalHistogram::dim_labels ( utility::vector1< std::string > const &  dim_labels1)
inline

References dim_labels_, and num_dimensions().

utility::vector1<numeric::Real> numeric::MultiDimensionalHistogram::end ( ) const
inline

References end_.

Referenced by end(), numeric::operator<<(), range(), and set_dimension().

void numeric::MultiDimensionalHistogram::end ( numeric::Real  end)
inline

References end(), end_, and num_dimensions().

void numeric::MultiDimensionalHistogram::end ( utility::vector1< numeric::Real > const &  end1)
inline

References end_, and num_dimensions().

void numeric::MultiDimensionalHistogram::end ( numeric::Size  dim,
numeric::Real  end 
)
inline

References end(), end_, and num_dimensions().

std::string const& numeric::MultiDimensionalHistogram::label ( ) const
inline

References label_.

Referenced by label(), numeric::operator<<(), and set_dimension().

void numeric::MultiDimensionalHistogram::label ( std::string const &  label)
inline

References label(), and label_.

numeric::Real numeric::MultiDimensionalHistogram::mean_squared_error ( utility::vector1< utility::vector1< numeric::Real > > const &  expected_1d_frequencies)
inline
utility::vector1<numeric::Size> numeric::MultiDimensionalHistogram::num_bins ( ) const
inline
void numeric::MultiDimensionalHistogram::num_bins ( numeric::Size  num_bins)
inline
void numeric::MultiDimensionalHistogram::num_bins ( utility::vector1< numeric::Size > const &  num_bins1)
inline
void numeric::MultiDimensionalHistogram::num_bins ( numeric::Size  dim,
numeric::Size  num_bins 
)
inline
numeric::Size numeric::MultiDimensionalHistogram::num_dimensions ( ) const
inline
void numeric::MultiDimensionalHistogram::num_dimensions ( numeric::Size  num)
inline
MultiDimensionalHistogram& numeric::MultiDimensionalHistogram::operator= ( MultiDimensionalHistogram const &  rhs)
inline

operator=

References counts_, dim_labels_, end_, label_, num_bins_, start_, and total_counts_.

void numeric::MultiDimensionalHistogram::range ( numeric::Size  dim,
numeric::Real  start,
numeric::Real  end 
)
inline

References end(), end_, num_dimensions(), start(), and start_.

void numeric::MultiDimensionalHistogram::record ( utility::vector1< numeric::Real > const &  values)
inline
void numeric::MultiDimensionalHistogram::record ( numeric::Real  value)
inline
void numeric::MultiDimensionalHistogram::reset_counts ( )
inline

References counts_, and total_counts_.

void numeric::MultiDimensionalHistogram::resize_counts ( )
inlineprivate

References counts_, num_bins_, and num_dimensions().

Referenced by collapse(), num_bins(), and set_dimension().

void numeric::MultiDimensionalHistogram::set_dimension ( numeric::Size  dim,
numeric::Size  num_bins,
numeric::Real  start,
numeric::Real  end,
std::string  label = "" 
)
inline
void numeric::MultiDimensionalHistogram::start ( numeric::Real  start)
inline
utility::vector1<numeric::Real> numeric::MultiDimensionalHistogram::start ( ) const
inline
void numeric::MultiDimensionalHistogram::start ( utility::vector1< numeric::Real > const &  start1)
inline
void numeric::MultiDimensionalHistogram::start ( numeric::Size  dim,
numeric::Real  start 
)
inline
numeric::Size numeric::MultiDimensionalHistogram::total_counts ( ) const
inline

References total_counts_.

Referenced by mean_squared_error().

Member Data Documentation

utility::vector0<numeric::Size> numeric::MultiDimensionalHistogram::counts_
private
utility::vector0<std::string> numeric::MultiDimensionalHistogram::dim_labels_
private
utility::vector0<numeric::Real> numeric::MultiDimensionalHistogram::end_
private
std::string numeric::MultiDimensionalHistogram::label_
private

Referenced by collapse(), label(), and operator=().

utility::vector0<numeric::Size> numeric::MultiDimensionalHistogram::num_bins_
private
utility::vector0<numeric::Real> numeric::MultiDimensionalHistogram::start_
private
numeric::Size numeric::MultiDimensionalHistogram::total_counts_
private

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