Sampler Class Reference
Represents an abstract random variable that can be sampled according to some discrete/continuous probability distribution. More...
#include <Sampler.h>

Public Member Functions | |
Constructors | |
| Sampler () | |
| virtual | ~Sampler () |
Initialization | |
| virtual void | init () |
| Should perform any initialization of this random variable which may be necessary to speed or prepare sampling. | |
Main usage interface | |
| virtual Event | sample ()=0 |
| virtual Event | sample (real_t &pdf) |
| Utility method to both sample this random variable and return the probability density with which that sample was chosen in the out variable pdf. | |
| virtual real_t | getPdf (const Event &event) PURE_FUNCTION=0 |
Detailed Description
Represents an abstract random variable that can be sampled according to some discrete/continuous probability distribution.
- Date:
- Fall 2008
Definition at line 17 of file Sampler.h.
Constructor & Destructor Documentation
Member Function Documentation
| virtual void Sampler::init | ( | ) | [inline, virtual] |
Should perform any initialization of this random variable which may be necessary to speed or prepare sampling.
- Note:
- should be called before calling sample or getPdf
default implementation is empty
Reimplemented in BSDF, AggregateBSDF, DielectricBSDF, ModifiedPhongBSDF, Emitter, EnvironmentMap, NullEmitter, Sensor, NullSensor, ExponentialSampler, JointContUniformSampler, NormalSampler, SensorSampler, UniformOnSphereSampler, UniformSampler< T >, UniformSampler< double >, and UniformSampler< int >.
| virtual Event Sampler::sample | ( | ) | [pure virtual] |
- Returns:
- a randomly chosen event x, sampled from this random variable's sample space
- Note:
- consecutive calls to sample are expected to return independent, identically distributed (IID) samples
Implemented in BSDF, AbsorbentBSDF, AggregateBSDF, DielectricBSDF, DiffuseBSDF, ModifiedPhongBSDF, Emitter, Sensor, NullSensor, ContUniformSampler, DiscreteUniformSampler, EmitterSampler, ExponentialSampler, JointContUniformSampler, NormalSampler, SensorSampler, and UniformOnSphereSampler.
Utility method to both sample this random variable and return the probability density with which that sample was chosen in the out variable pdf.
- Returns:
- a randomly chosen event x, sampled from this random variable's sample space
- Note:
- consecutive calls to sample are expected to return independent, identically distributed (IID) samples
Definition at line 14 of file Sampler.cpp.
- Returns:
- the probability density with which the given event would be sampled according to the underlying probability density function
- Note:
- the given event is assumed to lie within this random variable's sample space
Implemented in BSDF, AbsorbentBSDF, AggregateBSDF, DielectricBSDF, DiffuseBSDF, ModifiedPhongBSDF, Emitter, Sensor, NullSensor, ContUniformSampler, DiscreteUniformSampler, EmitterSampler, ExponentialSampler, JointContUniformSampler, NormalSampler, SensorSampler, and UniformOnSphereSampler.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6