JointContUniformSampler Class Reference
Represents a uniform distribution on [min,max)^N ; N > 0, which could be used, for example, for choosing a random UV coordinate (e.g, where N = 2, min = 0, max = 1). More...
#include <JointContUniformSampler.h>

Public Member Functions | |
Constructors | |
| JointContUniformSampler (unsigned min=0, unsigned max=0, unsigned dim=2) | |
| JointContUniformSampler (const JointContUniformSampler ©) | |
| virtual | ~JointContUniformSampler () |
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 () |
| virtual real_t | getPdf (const Event &event) PURE_FUNCTION |
Accessors/Mutators | |
| unsigned | getDimension () const |
Protected Attributes | |
| ContUniformSampler | m_sampler |
| unsigned | m_dimension |
Detailed Description
Represents a uniform distribution on [min,max)^N ; N > 0, which could be used, for example, for choosing a random UV coordinate (e.g, where N = 2, min = 0, max = 1).
- Date:
- Fall 2008
Definition at line 18 of file JointContUniformSampler.h.
Constructor & Destructor Documentation
| JointContUniformSampler::JointContUniformSampler | ( | unsigned | min = 0, |
|
| unsigned | max = 0, |
|||
| unsigned | dim = 2 | |||
| ) | [inline, explicit] |
Definition at line 24 of file JointContUniformSampler.h.
| JointContUniformSampler::JointContUniformSampler | ( | const JointContUniformSampler & | copy | ) | [inline] |
Definition at line 31 of file JointContUniformSampler.h.
| virtual JointContUniformSampler::~JointContUniformSampler | ( | ) | [inline, virtual] |
Definition at line 36 of file JointContUniformSampler.h.
Member Function Documentation
| void JointContUniformSampler::init | ( | ) | [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 initialiazes this random variable's sample space
Reimplemented from Sampler.
Definition at line 15 of file JointContUniformSampler.cpp.
| Event JointContUniformSampler::sample | ( | ) | [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
Implements Sampler.
Definition at line 22 of file JointContUniformSampler.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
Implements Sampler.
Definition at line 31 of file JointContUniformSampler.cpp.
| unsigned JointContUniformSampler::getDimension | ( | ) | const [inline] |
Member Data Documentation
ContUniformSampler JointContUniformSampler::m_sampler [protected] |
Definition at line 91 of file JointContUniformSampler.h.
unsigned JointContUniformSampler::m_dimension [protected] |
Definition at line 93 of file JointContUniformSampler.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6