IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::random::Distribution< T, Dim, DimP, DistributionFunctions > Class Template Reference

The class that represents a distribution. More...

#include <Distribution.h>

Inheritance diagram for ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >:
Collaboration diagram for ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >:

Public Member Functions

KOKKOS_INLINE_FUNCTION Distribution (const T *par_p)
 Constructor for the Distribution class.
KOKKOS_INLINE_FUNCTION ~Distribution ()
 Destructor for the Distribution class.
KOKKOS_INLINE_FUNCTION T getPdf (T x, unsigned int d) const
 A wrapper to change the signature arguments of pdf in each dimension d from (x, d, par) to (x, d).
KOKKOS_INLINE_FUNCTION T getCdf (T x, unsigned int d) const
 A wrapper to change the signature arguments of cdf in each dimension d from (x, d, par) to (x, d).
KOKKOS_INLINE_FUNCTION T getEstimate (T x, unsigned int d) const
 A wrapper to change the signature arguments of estimate in each dimension d from (x, d, par) to (x, d).
KOKKOS_INLINE_FUNCTION T getObjFunc (T x, unsigned int d, T u) const
KOKKOS_INLINE_FUNCTION T getDerObjFunc (T x, unsigned int d) const
KOKKOS_INLINE_FUNCTION T getFullPdf (ippl::Vector< T, Dim > x) const

Public Attributes

T par_m [DimP]
DistributionFunctions::PDF pdf_m
DistributionFunctions::CDF cdf_m
DistributionFunctions::Estimate estimate_m

Detailed Description

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
class ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >

The class that represents a distribution.

Template Parameters
TDatatype.
DimDimensionality of sample space.
DimPDimensionality of the parameter array.
PDFStruct type for the PDF (Probability Density Function).
CDFStruct type for the CDF (Cumulative Distribution Function).
ESTIMATEStruct type for the ESTIMATE function.

Definition at line 33 of file Distribution.h.

Constructor & Destructor Documentation

◆ Distribution()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::Distribution ( const T * par_p)
inline

Constructor for the Distribution class.

Parameters
par_Pointer to the parameter array.

Definition at line 51 of file Distribution.h.

References par_m.

◆ ~Distribution()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::~Distribution ( )
inline

Destructor for the Distribution class.

Definition at line 61 of file Distribution.h.

Member Function Documentation

◆ getCdf()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getCdf ( T x,
unsigned int d ) const
inline

A wrapper to change the signature arguments of cdf in each dimension d from (x, d, par) to (x, d).

Definition at line 75 of file Distribution.h.

References cdf_m, and par_m.

Referenced by getObjFunc().

Here is the caller graph for this function:

◆ getDerObjFunc()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getDerObjFunc ( T x,
unsigned int d ) const
inline
Returns
Derivative of the objective function that is used in inverse transform sampling, i.e. d(obj)/dx = pdf(x)

Definition at line 100 of file Distribution.h.

References getPdf().

Here is the call graph for this function:

◆ getEstimate()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getEstimate ( T x,
unsigned int d ) const
inline

A wrapper to change the signature arguments of estimate in each dimension d from (x, d, par) to (x, d).

Definition at line 83 of file Distribution.h.

References estimate_m, and par_m.

◆ getFullPdf()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getFullPdf ( ippl::Vector< T, Dim > x) const
inline
Returns
Total pdf given uncorrelated pdf in each dimension. i.e. total_pdf = pdf(x_1) * pdf(x_2) * ... pdf(x_N).

Definition at line 108 of file Distribution.h.

References Dim, and getPdf().

Here is the call graph for this function:

◆ getObjFunc()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getObjFunc ( T x,
unsigned int d,
T u ) const
inline
Returns
Objective function that is used in inverse transform sampling, i.e. obj = cdf(x)-u. Here u is uniformly distributed on [0, 1] and x is the sample of target distribution.

Definition at line 92 of file Distribution.h.

References getCdf().

Here is the call graph for this function:

◆ getPdf()

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
KOKKOS_INLINE_FUNCTION T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getPdf ( T x,
unsigned int d ) const
inline

A wrapper to change the signature arguments of pdf in each dimension d from (x, d, par) to (x, d).

Definition at line 67 of file Distribution.h.

References par_m, and pdf_m.

Referenced by getDerObjFunc(), and getFullPdf().

Here is the caller graph for this function:

Member Data Documentation

◆ cdf_m

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
DistributionFunctions::CDF ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::cdf_m

Definition at line 44 of file Distribution.h.

Referenced by getCdf().

◆ estimate_m

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
DistributionFunctions::Estimate ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::estimate_m

Definition at line 45 of file Distribution.h.

Referenced by getEstimate().

◆ par_m

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
T ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::par_m[DimP]
Parameters
par_mAn array of distribution parameters.
pdf_mPDF of the distribution class as a member functor.
cdf_mCDF of the distribution class as a member functor.
estimate_mEstimate of the initial guess for the sampling method as a member functor.

Definition at line 42 of file Distribution.h.

Referenced by Distribution(), getCdf(), getEstimate(), and getPdf().

◆ pdf_m

template<typename T, unsigned Dim, unsigned DimP, typename DistributionFunctions>
DistributionFunctions::PDF ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::pdf_m

Definition at line 43 of file Distribution.h.

Referenced by getPdf().


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