HDK
|
#include <UT_Cdf.h>
Public Types | |
enum | { DIM = N } |
using | value_type = T |
Public Member Functions | |
UT_Cdf () | |
UT_Cdf (T *data, const int *res, const bool ©data) | |
template<class F > | |
UT_Cdf (const F &ftor, const int *res) | |
UT_Cdf (const int *res) | |
~UT_Cdf () | |
void | clear () |
Clear associated storage. More... | |
void | resize (const int *res) |
void | setRawArray (T *data, const bool ©data) |
template<class F > | |
void | setRawArray (const F &ftor) |
T * | getRawArray () |
void | build () |
void | sample (const T *u, T *dval) const |
void | sample (const T *u, T *dval, T &pdf) const |
void | sample (const T *u, int *didx) const |
Same as above but produces an exact index. More... | |
void | sample (const T *u, int *didx, T *doff, T &pdf) const |
void | evaluatePdf (const T *u, T &pdf) const |
Evaluate the pdf at the given index. More... | |
const T & | getSum () const |
Get the sum over all image values. More... | |
const T & | getISum () const |
const T & | getScaling () const |
Get the average image value. More... | |
const T & | getIScaling () const |
int | getDim () const |
const int * | getRes () const |
const int & | getRes (int dim) const |
void | dump () const |
size_t | getMemoryUsage () const |
using UT_Cdf< N, T, S >::value_type = T |
anonymous enum |
Create a cdf without data. You should then use getRawArray() or setRawArray() functions and build() to construct the cdf. This method avoids duplication of memory for the pdf and cdf when only the cdf is needed. res = resolution for each dimension
Build the cdf from the row-major data array. If you provided data to the constructor, you don't need to call this method unless you've modified the data through getRawArray().