Clamped two-tailed geometric distribution. More...
#include <mitsuba/bidir/geodist2.h>
Public Member Functions | |
TwoTailedGeoDistr (Float base) | |
Create a new two-tailed distribution for the given base constant. More... | |
void | configure (int center, int start, int end) |
Configure the domain and center of the distribution. More... | |
Float | pmf (int i) const |
Evaluate the probability mass function at position i . More... | |
Float | cdf (int i) const |
Evaluate the cumulative distribution function at position i . More... | |
int | sample (Float xi) const |
Draw a position according to the probability mass function. More... | |
Protected Member Functions | |
Float | r (int i) const |
Float | R (int i) const |
int | Rinv (Float x) const |
Clamped two-tailed geometric distribution.
This class implements a specialized clamped two-tailed geometric distribution with support for sample generation and evaluation of the probability mass and cumulative distribution functions.
The precise form of the distribution is
\[ P(i) = \begin{cases} c b^{-|i-o|},&\text{if } i\ge l\text{ and }i\le r\\ 0,&\mathrm{otherwise} \end{cases} \]
where \(b\in\mathbb{R}\) is the base parameter of the distribution, \([l,r]\subseteq\mathbb{Z}\) denotes the domain of the probability mass function, \(o\in\mathbb{Z}\) is offset, and \(c\) is a suitably chosen normalization constant.
This function is used to propose bidirectional mutations; see the MLT writeup for details.
|
inline |
Create a new two-tailed distribution for the given base constant.
|
inline |
Evaluate the cumulative distribution function at position i
.
|
inline |
Configure the domain and center of the distribution.
|
inline |
Evaluate the probability mass function at position i
.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Draw a position according to the probability mass function.