HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_Cdf.h File Reference
#include "UT_API.h"
#include <SYS/SYS_Types.h>
#include <SYS/SYS_Math.h>
#include "UT_Assert.h"
#include "UT_Algorithm.h"
#include "UT_RootFinder.h"
#include "UT_VoxelArray.h"
+ Include dependency graph for UT_Cdf.h:

Go to the source code of this file.

Classes

struct  UT_CdfLinearSearch
 
struct  UT_CdfStdBinarySearch
 
struct  UT_CdfFastBinarySearch
 
struct  UT_CdfIndexer< N >
 
struct  UT_CdfIndexer< 1 >
 
struct  UT_CdfIndexer< 2 >
 
struct  UT_CdfIndexer< 3 >
 
struct  UT_CdfValue
 
struct  UT_CdfValueFill< N >
 
struct  UT_CdfValueFill< 1 >
 
struct  UT_CdfValueFill< 2 >
 
struct  UT_CdfValueFill< 3 >
 
struct  UT_CdfValueVoxelArrayF
 
class  UT_Cdf< N, S >
 

Typedefs

typedef UT_CdfStdBinarySearch UT_Cdf_default_search_t
 

Functions

template<class InputIt >
void UTfillCdfIdentity (InputIt cdf, const int &res)
 Fill a linear cdf with res entries of a linear gradient. More...
 
template<class S , class InputIt >
int UTsampleCdf (InputIt cdf_begin, const int &res, const float &u)
 
template<class S , class InputIt >
int UTsampleCdf (InputIt cdf_begin, const int &res, const float &u, float &dval, float &pdf)
 
template<class InputIt >
void UTsampleCdf (InputIt cdf_begin, const int &res, const int &i, float &pdf)
 Sample the pdf from a linear cdf at index i with res entries. More...
 
float UTsampleTrapezoidPdf (float u, float d0, float d1)
 
template<class InputIt , class OutputIt >
void UTcreatePdf (InputIt values_begin, InputIt values_end, OutputIt pdf_begin)
 Create a PDF from a range of values. More...
 
template<class InputIt , class OutputIt >
void UTcreateCdf (InputIt values_begin, InputIt values_end, OutputIt cdf_begin)
 Create a CDF from a range of values. More...
 

Typedef Documentation

Definition at line 66 of file UT_Cdf.h.

Function Documentation

template<class InputIt , class OutputIt >
void UTcreateCdf ( InputIt  values_begin,
InputIt  values_end,
OutputIt  cdf_begin 
)
inline

Create a CDF from a range of values.

Definition at line 318 of file UT_Cdf.h.

template<class InputIt , class OutputIt >
void UTcreatePdf ( InputIt  values_begin,
InputIt  values_end,
OutputIt  pdf_begin 
)
inline

Create a PDF from a range of values.

Definition at line 295 of file UT_Cdf.h.

template<class InputIt >
void UTfillCdfIdentity ( InputIt  cdf,
const int res 
)
inline

Fill a linear cdf with res entries of a linear gradient.

Definition at line 209 of file UT_Cdf.h.

template<class S , class InputIt >
int UTsampleCdf ( InputIt  cdf_begin,
const int res,
const float &  u 
)
inline

Sample from a linear cdf with res entries. The return value is the sampled array index.

Definition at line 223 of file UT_Cdf.h.

template<class S , class InputIt >
int UTsampleCdf ( InputIt  cdf_begin,
const int res,
const float &  u,
float &  dval,
float &  pdf 
)
inline

Sample from a linear cdf with res entries. The return value is the sampled array index and dval is the offset.

Definition at line 232 of file UT_Cdf.h.

template<class InputIt >
void UTsampleCdf ( InputIt  cdf_begin,
const int res,
const int i,
float &  pdf 
)
inline

Sample the pdf from a linear cdf at index i with res entries.

Definition at line 261 of file UT_Cdf.h.

float UTsampleTrapezoidPdf ( float  u,
float  d0,
float  d1 
)
inline

Find the value x from 0 to 1 where the area from 0 to x under the trapezoid (0,0),(1,0),(1,d1),(0,d0) is portion u of the total area.

Definition at line 280 of file UT_Cdf.h.