HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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_CdfValueFill< N >
 
struct  UT_CdfValueFill< 1 >
 
struct  UT_CdfValueFill< 2 >
 
struct  UT_CdfValueFill< 3 >
 
struct  UT_CdfValueVoxelArrayF
 
class  UT_Cdf< N, T, S >
 

Typedefs

typedef UT_CdfStdBinarySearch UT_Cdf_default_search_t
 

Functions

template<class OutputIt >
void UTfillCdfIdentity (OutputIt cdf, const int res)
 Fill a linear cdf with res entries of a linear gradient. More...
 
template<class S , class InputIt , typename T >
int UTsampleCdf (InputIt cdf_begin, const int &res, const T &u)
 
template<class S , class InputIt , typename T >
int UTsampleCdf (InputIt cdf_begin, const int &res, const T &u, T &dval, T &pdf)
 
template<class InputIt , typename T >
void UTsampleCdf (InputIt cdf_begin, const int &res, const int &i, T &pdf)
 Sample the pdf from a linear cdf at index i with res entries. More...
 
template<typename T >
UTsampleTrapezoidPdf (T u, T d0, T 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 69 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 319 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 296 of file UT_Cdf.h.

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

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

Definition at line 210 of file UT_Cdf.h.

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

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

Definition at line 225 of file UT_Cdf.h.

template<class S , class InputIt , typename T >
int UTsampleCdf ( InputIt  cdf_begin,
const int res,
const T &  u,
T &  dval,
T &  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 234 of file UT_Cdf.h.

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

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

Definition at line 263 of file UT_Cdf.h.

template<typename T >
T UTsampleTrapezoidPdf ( u,
d0,
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 281 of file UT_Cdf.h.