Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::Mutator Class Referenceabstract

Generic interface to path-space mutators. More...

#include <mitsuba/bidir/mutator.h>

+ Inheritance diagram for mitsuba::Mutator:

Public Types

enum  EMutationType {
  EBidirectionalMutation = 0, ELensPerturbation, ELensSubpathMutation, EIndependentMutation,
  ECausticPerturbation, EMultiChainPerturbation, EManifoldPerturbation, EMutationTypeCount
}
 Specifies the type of mutation implemented by the mutator. More...
 

Public Member Functions

virtual EMutationType getType () const =0
 What kind of mutations does this mutator perform? More...
 
virtual Float suitability (const Path &path) const =0
 Determine the general "suitability" of this mutator for a given kind of path. More...
 
virtual bool sampleMutation (Path &source, Path &proposal, MutationRecord &muRec, const MutationRecord &sourceMuRec)=0
 Given a path, this function produces a new proposal according to the internally implemented mutation strategy. More...
 
virtual Float Q (const Path &source, const Path &proposal, const MutationRecord &muRec) const =0
 For a pair of paths, this function computes the inverse transition probability (matching the Q term in [Veach 97]) More...
 
virtual void accept (const MutationRecord &muRec)=0
 Record an accepted mutation. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~Mutator ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 

Detailed Description

Generic interface to path-space mutators.

This is the superclass of all path-space mutators, such as the bidirectional mutation or lens perturbation in Veach-MLT.

Member Enumeration Documentation

Specifies the type of mutation implemented by the mutator.

Enumerator
EBidirectionalMutation 
ELensPerturbation 
ELensSubpathMutation 
EIndependentMutation 
ECausticPerturbation 
EMultiChainPerturbation 
EManifoldPerturbation 
EMutationTypeCount 

Constructor & Destructor Documentation

virtual mitsuba::Mutator::~Mutator ( )
inlineprotectedvirtual

Virtual destructor.

Member Function Documentation

virtual void mitsuba::Mutator::accept ( const MutationRecord muRec)
pure virtual

Record an accepted mutation.

This function exists to allow mutators to track their acceptance rate and other statistics.

Implemented in mitsuba::BidirectionalMutator, mitsuba::CausticPerturbation, mitsuba::LensPerturbation, mitsuba::MultiChainPerturbation, and mitsuba::ManifoldPerturbation.

virtual const Class* mitsuba::Mutator::getClass ( ) const
virtual
virtual EMutationType mitsuba::Mutator::getType ( ) const
pure virtual
virtual Float mitsuba::Mutator::Q ( const Path source,
const Path proposal,
const MutationRecord muRec 
) const
pure virtual

For a pair of paths, this function computes the inverse transition probability (matching the Q term in [Veach 97])

Parameters
sourceA path data structure containing the original path
proposalA path data structure containing the proposed mutated path
muRecData record that describes the mutation strategy, which transformed source to proposal.

Implemented in mitsuba::BidirectionalMutator, mitsuba::CausticPerturbation, mitsuba::LensPerturbation, mitsuba::MultiChainPerturbation, and mitsuba::ManifoldPerturbation.

virtual bool mitsuba::Mutator::sampleMutation ( Path source,
Path proposal,
MutationRecord muRec,
const MutationRecord sourceMuRec 
)
pure virtual

Given a path, this function produces a new proposal according to the internally implemented mutation strategy.

Parameters
sourceThe sampling strategy implemented by the mutator will condition on this path.
proposalPath data structure to be filled with the proposed mutated path
muRecData record that describes the sampled mutation strategy
sourceMuRecData record that describes the last successful mutation strategy (for the source path)
Returns
true upon success. When the sampling step is unsuccessful (this could happen due to various reasons), the function returns false.

Implemented in mitsuba::BidirectionalMutator, mitsuba::CausticPerturbation, mitsuba::LensPerturbation, mitsuba::MultiChainPerturbation, and mitsuba::ManifoldPerturbation.

virtual Float mitsuba::Mutator::suitability ( const Path path) const
pure virtual

Determine the general "suitability" of this mutator for a given kind of path.

Implemented in mitsuba::BidirectionalMutator, mitsuba::CausticPerturbation, mitsuba::LensPerturbation, mitsuba::MultiChainPerturbation, and mitsuba::ManifoldPerturbation.

Member Data Documentation

Class* mitsuba::Mutator::m_theClass
static

The documentation for this class was generated from the following file: