Mitsuba Renderer  0.5.0
mitsuba::TwoTailedGeoDistr Struct Reference

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

## Detailed Description

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.

## Constructor & Destructor Documentation

 mitsuba::TwoTailedGeoDistr::TwoTailedGeoDistr ( Float base )
inline

Create a new two-tailed distribution for the given base constant.

## Member Function Documentation

 Float mitsuba::TwoTailedGeoDistr::cdf ( int i ) const
inline

Evaluate the cumulative distribution function at position i.

 void mitsuba::TwoTailedGeoDistr::configure ( int center, int start, int end )
inline

Configure the domain and center of the distribution.

 Float mitsuba::TwoTailedGeoDistr::pmf ( int i ) const
inline

Evaluate the probability mass function at position i.

 Float mitsuba::TwoTailedGeoDistr::r ( int i ) const
inlineprotected
 Float mitsuba::TwoTailedGeoDistr::R ( int i ) const
inlineprotected
 int mitsuba::TwoTailedGeoDistr::Rinv ( Float x ) const
inlineprotected
 int mitsuba::TwoTailedGeoDistr::sample ( Float xi ) const
inline

Draw a position according to the probability mass function.

The documentation for this struct was generated from the following file: