SPH
Public Member Functions | List of all members
VectorPdfRng< TScalarRng > Class Template Reference

Generic generator of random vectors using sampling with given PDF. More...

#include <VectorRng.h>

Inheritance diagram for VectorPdfRng< TScalarRng >:
Noncopyable

Public Member Functions

 VectorPdfRng (const Box &box, const Function< Float(const Vector &)> &pdf=[](const Vector &) { return 1._f;}, const Function< Float(const Vector &)> &jacobian=[](const Vector &) { return 1._f;}, const Float maximalPdf=0._f)
 
Vector operator() ()
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

template<typename TScalarRng>
class VectorPdfRng< TScalarRng >

Generic generator of random vectors using sampling with given PDF.

PDF does NOT have to be normalized (integral does not have to be 1).

Todo:
make jacobian work, create few basic coordinate systems

Definition at line 60 of file VectorRng.h.

Constructor & Destructor Documentation

◆ VectorPdfRng()

template<typename TScalarRng >
VectorPdfRng< TScalarRng >::VectorPdfRng ( const Box box,
const Function< Float(const Vector &)> &  pdf = [](const Vector&) { return 1._f; },
const Function< Float(const Vector &)> &  jacobian = [](const Vector&) { return 1._f; },
const Float  maximalPdf = 0._f 
)
inline

Construct a random vector generator.

Parameters
boxbounds for minimal and maximal random values
pdfUsed PDF. Default value means uniform sampling. Does not have to be normalized, but must return strictly non-negative values.
jacobianUsed Jacobian if other coordinate system is to be used. Default is cartesian system.
maximalPdfMaximal value of given PDF. By default, the value is estimated from the function itself.
Todo:
should depend on jacobian
Todo:
jacobian

Definition at line 76 of file VectorRng.h.

Member Function Documentation

◆ operator()()

template<typename TScalarRng >
Vector VectorPdfRng< TScalarRng >::operator() ( )
inline

Definition at line 97 of file VectorRng.h.


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