UniformSampler< T > Class Template Reference
Represents a uniform distribution (either discrete or continuous), parameterized by [min,max). More...
#include <UniformSampler.h>

Public Member Functions | |
Constructors | |
| UniformSampler (T min=-std::numeric_limits< T >::max(), T max=std::numeric_limits< T >::max()) | |
| UniformSampler (const UniformSampler ©) | |
| virtual | ~UniformSampler () |
Initialization | |
| virtual void | init () |
| Should perform any initialization of this random variable which may be necessary to speed or prepare sampling. | |
Accessors/Mutators | |
| T | getMin () const |
| T | getMax () const |
Protected Attributes | |
| T | m_min |
| T | m_max |
Detailed Description
template<typename T>
class UniformSampler< T >
Represents a uniform distribution (either discrete or continuous), parameterized by [min,max).
- Date:
- Fall 2008
Definition at line 18 of file UniformSampler.h.
Constructor & Destructor Documentation
| UniformSampler< T >::UniformSampler | ( | T | min = -std::numeric_limits<T>::max(), |
|
| T | max = std::numeric_limits<T>::max() | |||
| ) | [inline, explicit] |
Definition at line 24 of file UniformSampler.h.
| UniformSampler< T >::UniformSampler | ( | const UniformSampler< T > & | copy | ) | [inline] |
Definition at line 30 of file UniformSampler.h.
| virtual UniformSampler< T >::~UniformSampler | ( | ) | [inline, virtual] |
Definition at line 35 of file UniformSampler.h.
Member Function Documentation
| virtual void UniformSampler< T >::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 initialiazes this random variable's sample space
Reimplemented from Sampler.
Definition at line 53 of file UniformSampler.h.
| T UniformSampler< T >::getMin | ( | ) | const [inline] |
- Returns:
- the mean 'mu' of this normal random variable
Definition at line 67 of file UniformSampler.h.
| T UniformSampler< T >::getMax | ( | ) | const [inline] |
- Returns:
- the variance 'sigma squared' of this normal random variable
Definition at line 74 of file UniformSampler.h.
Member Data Documentation
T UniformSampler< T >::m_min [protected] |
Definition at line 81 of file UniformSampler.h.
T UniformSampler< T >::m_max [protected] |
Definition at line 82 of file UniformSampler.h.
The documentation for this class was generated from the following file:
Generated on 28 Feb 2009 for Milton by
1.5.6