Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
PSSMLTPrimarySampler Class Referenceabstract

#include <pssmlt.sampler.h>

Public Member Functions

 LM_COMPONENT_INTERFACE_DEF ("pssmltprimarysampler")
 
virtual void Configure (Random *rng, const Math::Float &s1, const Math::Float &s2)=0
 
virtual void Accept ()=0
 
virtual void Reject ()=0
 
virtual void EnableLargeStepMutation (bool enable)=0
 
virtual bool LargeStepMutation () const =0
 
virtual void BeginRestore (RewindableSampler &rewindableSampler)=0
 
virtual void EndRestore ()=0
 
virtual void GetCurrentSampleState (std::vector< Math::Float > &samples) const =0
 
virtual void GetCurrentSampleState (std::vector< Math::Float > &samples, int numSamples)=0
 
- Public Member Functions inherited from Sampler
virtual SamplerClone () const =0
 
virtual void SetSeed (unsigned int seed)=0
 
virtual Math::Float Next ()=0
 
virtual unsigned int NextUInt ()=0
 
virtual Math::Vec2 NextVec2 ()=0
 
virtual RandomRng ()=0
 
LM_PUBLIC_API void SetSeedWithCurrentTime ()
 
- Public Member Functions inherited from Component
virtual std::string ComponentInterfaceTypeName () const =0
 
virtual std::string ComponentImplTypeName () const =0
 
- Public Member Functions inherited from SIMDAlignedType
void * operator new (std::size_t size) throw (std::bad_alloc)
 
void operator delete (void *p)
 

Detailed Description

Kelemen's primary sample. Represents an element of the primary sample space. The class shares the same interface as generic Sampler class, so we can use this class to sample light paths without modification of the implementation of path samplers. The function is also responsible for the lazy evaluation of the mutations which is required to support infinite dimension space. For details, see the original paper.

Inheritance diagram for PSSMLTPrimarySampler:
Sampler Component SIMDAlignedType PSSMLTPrimarySamplerImpl

Member Function Documentation

virtual void PSSMLTPrimarySampler::Accept ( )
pure virtual

Accept mutation. Indicates to accept mutated samples.

Implemented in PSSMLTPrimarySamplerImpl.

virtual void PSSMLTPrimarySampler::BeginRestore ( RewindableSampler rewindableSampler)
pure virtual

Begin to restore samples. Begins to set internal sample state using the restored sequence of samples with rewindable sampler. Path sampling process dispatched between BeginRestore and EndRestore is recorded in a form of primary samples.

Parameters
rewindableSamplerRewindable sampler.
See also
EndRestore

Implemented in PSSMLTPrimarySamplerImpl.

virtual void PSSMLTPrimarySampler::Configure ( Random rng,
const Math::Float &  s1,
const Math::Float &  s2 
)
pure virtual

Configure the sampler. Configure and initializes the sampler. This function must be called before use.

Parameters
rngRandom number generator.
s1Lower bound of the kernel.
s2Upper bound of the kernel.

Implemented in PSSMLTPrimarySamplerImpl.

virtual void PSSMLTPrimarySampler::EnableLargeStepMutation ( bool  enable)
pure virtual

Enable large step mutation. Enables to use large step mutation in the next mutation step.

Parameters
enableEnabled if true.

Implemented in PSSMLTPrimarySamplerImpl.

virtual void PSSMLTPrimarySampler::EndRestore ( )
pure virtual

End to restore samples. Corresponds to BeginRestore.

See also
BeginRestore

Implemented in PSSMLTPrimarySamplerImpl.

virtual bool PSSMLTPrimarySampler::LargeStepMutation ( ) const
pure virtual

Check if current mutation is large step mutation.

Return values
trueCurrent mutation is large step mutation.
falseCurrent mutation is small step mutation.

Implemented in PSSMLTPrimarySamplerImpl.

virtual void PSSMLTPrimarySampler::Reject ( )
pure virtual

Reject mutation. Indicates to reject mutated samples. The internal state is restored to previous state.

Implemented in PSSMLTPrimarySamplerImpl.


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