OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
ippl::random::Distribution< T, Dim, DimP, DistributionFunctions > Class Template Reference

The class that represents a distribution. More...

#include <Distribution.h>

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

Public Member Functions

KOKKOS_INLINE_FUNCTION Distribution (const T *par_p)
 Constructor for the Distribution class. More...
 
KOKKOS_INLINE_FUNCTION ~Distribution ()
 Destructor for the Distribution class. More...
 
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). More...
 
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). More...
 
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). More...
 
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 ippl/src/Random/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 ippl/src/Random/Distribution.h.

References ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::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 ippl/src/Random/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

◆ 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 ippl/src/Random/Distribution.h.

References ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getPdf().

Referenced by ippl::random::detail::NewtonRaphson< T, Distribution >::solve().

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

◆ 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 ippl/src/Random/Distribution.h.

References Dim, and ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::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 ippl/src/Random/Distribution.h.

References ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getCdf().

Referenced by ippl::random::detail::NewtonRaphson< T, Distribution >::solve().

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

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

◆ estimate_m

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

◆ 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 ippl/src/Random/Distribution.h.

Referenced by ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::Distribution(), ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getCdf(), ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getEstimate(), and ippl::random::Distribution< T, Dim, DimP, DistributionFunctions >::getPdf().

◆ pdf_m

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

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