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>

Inheritance diagram for JointContUniformSampler:

Sampler

List of all members.

Public Member Functions

Constructors
 JointContUniformSampler (unsigned min=0, unsigned max=0, unsigned dim=2)
 JointContUniformSampler (const JointContUniformSampler &copy)
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).

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

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.

real_t JointContUniformSampler::getPdf ( const Event event  )  [virtual]

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]

Returns:
the dimension of this distribution

Definition at line 84 of file JointContUniformSampler.h.


Member Data Documentation

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 doxygen 1.5.6