MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::Histogram Class Reference

#include <MRHistogram.h>

Public Member Functions

 Histogram ()=default
 
MRMESH_API Histogram (float min, float max, size_t size)
 Initialize histogram with minimum and maximum values, and number of bins.
 
MRMESH_API void addSample (float sample, size_t count=1)
 Adds sample to corresponding bin.
 
MRMESH_API void addHistogram (const Histogram &hist)
 Adds bins of input hist to this.
 
MRMESH_API const std::vector< size_t > & getBins () const
 Gets bins.
 
MRMESH_API float getMin () const
 Gets minimum value of histogram.
 
MRMESH_API float getMax () const
 Gets maximum value of histogram.
 
MRMESH_API size_t getBinId (float sample) const
 Gets id of bin that inherits sample.
 
MRMESH_API std::pair< float, float > getBinMinMax (size_t binId) const
 Gets minimum and maximum of diapason inherited by bin.
 
size_t heapBytes () const
 returns the amount of memory this object occupies on heap
 

Detailed Description

Simple class for calculating histogram


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