|
|
| DiscretePDF (size_t nEntries=0) |
| | Allocate memory for a distribution with the given number of entries.
|
| |
|
void | clear () |
| | Clear all entries.
|
| |
|
void | reserve (size_t nEntries) |
| | Reserve memory for a certain number of entries.
|
| |
|
void | append (float pdfValue) |
| | Append an entry with the specified discrete probability.
|
| |
|
size_t | size () const |
| | Return the number of entries so far.
|
| |
|
float | operator[] (size_t entry) const |
| | Access an entry by its index.
|
| |
|
bool | isNormalized () const |
| | Have the probability densities been normalized?
|
| |
| float | getSum () const |
| | Return the original (unnormalized) sum of all PDF entries. More...
|
| |
| float | getNormalization () const |
| | Return the normalization factor (i.e. the inverse of getSum()) More...
|
| |
| float | normalize () |
| | Normalize the distribution. More...
|
| |
| size_t | sample (float sampleValue) const |
| | Transform a uniformly distributed sample to the stored distribution More...
|
| |
| size_t | sample (float sampleValue, float &pdf) const |
| | Transform a uniformly distributed sample to the stored distribution More...
|
| |
| size_t | sampleReuse (float &sampleValue) const |
| | Transform a uniformly distributed sample to the stored distribution More...
|
| |
| size_t | sampleReuse (float &sampleValue, float &pdf) const |
| | Transform a uniformly distributed sample. More...
|
| |
|
std::string | toString () const |
| | Turn the underlying distribution into a human-readable string format.
|
| |
Discrete probability distribution.
This data structure can be used to transform uniformly distributed samples to a stored discrete probability distribution.
Definition at line 34 of file dpdf.h.