Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pmf.h File Reference
#include <mitsuba/mitsuba.h>

Go to the source code of this file.

Classes

struct  mitsuba::DiscreteDistribution
 Discrete probability distribution. More...
 
struct  mitsuba::math::AliasTableEntry< QuantizedScalar, Index >
 Alias sampling data structure (see makeAliasTable() for details) More...
 

Namespaces

 mitsuba
 
 mitsuba::math
 

Macros

#define __MITSUBA_CORE_PMF_H_
 

Functions

template<typename Scalar , typename QuantizedScalar , typename Index >
float mitsuba::math::makeAliasTable (AliasTableEntry< QuantizedScalar, Index > *tbl, Scalar *pmf, Index size)
 Create the lookup table needed for Walker's alias sampling method implemented in sampleAlias(). Runs in linear time. More...
 
template<typename Scalar , typename QuantizedScalar , typename Index >
Index mitsuba::math::sampleAlias (const AliasTableEntry< QuantizedScalar, Index > *tbl, Index size, Scalar sample)
 Generate a sample in constant time using the alias method. More...
 
template<typename Scalar , typename QuantizedScalar , typename Index >
Index mitsuba::math::sampleAliasReuse (const AliasTableEntry< QuantizedScalar, Index > *tbl, Index size, Scalar &sample)
 Generate a sample in constant time using the alias method. More...
 

Macro Definition Documentation

#define __MITSUBA_CORE_PMF_H_