KrisLibrary  1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
Statistics::Histogram3D Class Reference

3-D histogram class More...

#include <Histogram3D.h>

Public Types

typedef Real Point[3]
 
typedef int Index[3]
 
typedef size_t Size[3]
 

Public Member Functions

void Clear ()
 Creates one big bucket.
 
void Resize (const Size dims, const Point min, const Point max)
 Creates mxnxp uniformly spaced buckets between min,max.
 
void ResizeToFit (const std::vector< Point > &data, const Size dims)
 Creates mxnxp uniformly spaced buckets between the min/max of data.
 
void Fill (Real val=0)
 Fills all buckets with the given value.
 
void Calculate (const std::vector< Point > &data)
 Calculates the histogram of the data.
 
void Calculate (const std::vector< Real > &data1, const std::vector< Real > &data2, const std::vector< Real > &data3)
 Calculates the histogram of the data, given as (data1[i],data2[i],data3[i])
 
void GetRange (const Index bucket, Point min, Point max) const
 Gets the range of the given bucket.
 
void GetBucket (const Point val, Index bucket) const
 
void AddBucket (const Point val, Real num=1)
 
void AddBucket (Real v1, Real v2, Real v3, Real num=1)
 
Real GetBucketCount (Index bucket) const
 
Real NumObservations () const
 

Public Attributes

std::vector< Real > div1
 
std::vector< Real > div2
 
std::vector< Real > div3
 
Array3D< Real > buckets
 (div1.size()+1) x (div2.size()+1) x (div3.size()+1 buckets
 

Detailed Description

3-D histogram class


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