This class computes a histogram, with a fixed interval width, of a population of floating-point values.  
 More...
#include <openvdb/math/Stats.h>
 | 
|   | Histogram (double min, double max, size_t numBins=10) | 
|   | Construct with given minimum and maximum values and the given bin count.  More...
  | 
|   | 
|   | Histogram (const Stats &s, size_t numBins=10) | 
|   | Construct with the given bin count and with minimum and maximum values taken from a Stats object.  More...
  | 
|   | 
| bool  | add (double val, uint64_t n=1) | 
|   | Add n samples with constant value val, provided that the val falls within this histogram's value range.  More...
  | 
|   | 
| bool  | add (const Histogram &other) | 
|   | Add all the contributions from the other histogram, provided that it has the same configuration as this histogram.  More...
  | 
|   | 
| size_t  | numBins () const  | 
|   | Return the number of bins in this histogram.  More...
  | 
|   | 
| double  | min () const  | 
|   | Return the lower bound of this histogram's value range.  More...
  | 
|   | 
| double  | max () const  | 
|   | Return the upper bound of this histogram's value range.  More...
  | 
|   | 
| double  | min (int n) const  | 
|   | Return the minimum value in the nth bin.  More...
  | 
|   | 
| double  | max (int n) const  | 
|   | Return the maximum value in the nth bin.  More...
  | 
|   | 
| uint64_t  | count (int n) const  | 
|   | Return the number of samples in the nth bin.  More...
  | 
|   | 
| uint64_t  | size () const  | 
|   | Return the population size, i.e., the total number of samples.  More...
  | 
|   | 
| void  | print (const std::string &name="", std::ostream &strm=std::cout) const  | 
|   | Print the histogram to the specified output stream.  More...
  | 
|   | 
This class computes a histogram, with a fixed interval width, of a population of floating-point values. 
 
  
  
      
        
          | Histogram  | 
          ( | 
          double  | 
          min,  | 
         
        
           | 
           | 
          double  | 
          max,  | 
         
        
           | 
           | 
          size_t  | 
          numBins = 10  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Construct with given minimum and maximum values and the given bin count. 
 
 
Construct with the given bin count and with minimum and maximum values taken from a Stats object. 
 
 
  
  
      
        
          | bool add  | 
          ( | 
          double  | 
          val,  | 
         
        
           | 
           | 
          uint64_t  | 
          n = 1  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Add n samples with constant value val, provided that the val falls within this histogram's value range. 
- Returns
 true if the sample value falls within this histogram's value range. 
 
 
Add all the contributions from the other histogram, provided that it has the same configuration as this histogram. 
 
 
  
  
      
        
          | uint64_t count  | 
          ( | 
          int  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Return the number of samples in the nth bin. 
 
 
Return the upper bound of this histogram's value range. 
 
 
  
  
      
        
          | double max  | 
          ( | 
          int  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Return the maximum value in the nth bin. 
 
 
Return the lower bound of this histogram's value range. 
 
 
  
  
      
        
          | double min  | 
          ( | 
          int  | 
          n | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Return the minimum value in the nth bin. 
 
 
Return the number of bins in this histogram. 
 
 
  
  
      
        
          | void print  | 
          ( | 
          const std::string &  | 
          name = "",  | 
         
        
           | 
           | 
          std::ostream &  | 
          strm = std::cout  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Print the histogram to the specified output stream. 
 
 
Return the population size, i.e., the total number of samples.