UniformSampler< T > Class Template Reference

Represents a uniform distribution (either discrete or continuous), parameterized by [min,max). More...

#include <UniformSampler.h>

Inheritance diagram for UniformSampler< T >:

Sampler ContUniformSampler

List of all members.

Public Member Functions

Constructors
 UniformSampler (T min=-std::numeric_limits< T >::max(), T max=std::numeric_limits< T >::max())
 UniformSampler (const UniformSampler &copy)
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
getMin () const
getMax () const

Protected Attributes

m_min
m_max


Detailed Description

template<typename T>
class UniformSampler< T >

Represents a uniform distribution (either discrete or continuous), parameterized by [min,max).

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008

Definition at line 18 of file UniformSampler.h.


Constructor & Destructor Documentation

template<typename T>
UniformSampler< T >::UniformSampler ( min = -std::numeric_limits<T>::max(),
max = std::numeric_limits<T>::max() 
) [inline, explicit]

Definition at line 24 of file UniformSampler.h.

template<typename T>
UniformSampler< T >::UniformSampler ( const UniformSampler< T > &  copy  )  [inline]

Definition at line 30 of file UniformSampler.h.

template<typename T>
virtual UniformSampler< T >::~UniformSampler (  )  [inline, virtual]

Definition at line 35 of file UniformSampler.h.


Member Function Documentation

template<typename T>
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.

template<typename T>
T UniformSampler< T >::getMin (  )  const [inline]

Returns:
the mean 'mu' of this normal random variable

Definition at line 67 of file UniformSampler.h.

template<typename T>
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

template<typename T>
T UniformSampler< T >::m_min [protected]

Definition at line 81 of file UniformSampler.h.

template<typename T>
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 doxygen 1.5.6