7#ifndef IPPL_DISTRIBUTION_H
8#define IPPL_DISTRIBUTION_H
12#include "Random/Utility.h"
32 template <
typename T,
unsigned Dim,
unsigned DimP,
typename DistributionFunctions>
43 typename DistributionFunctions::PDF pdf_m;
44 typename DistributionFunctions::CDF cdf_m;
45 typename DistributionFunctions::Estimate estimate_m;
52 for (
unsigned int i = 0; i < DimP; i++) {
67 KOKKOS_INLINE_FUNCTION T
getPdf(T x,
unsigned int d)
const {
68 return pdf_m(x, d,
par_m);
75 KOKKOS_INLINE_FUNCTION T
getCdf(T x,
unsigned int d)
const {
76 return cdf_m(x, d,
par_m);
83 KOKKOS_INLINE_FUNCTION T
getEstimate(T x,
unsigned int d)
const {
84 return estimate_m(x, d,
par_m);
92 KOKKOS_INLINE_FUNCTION T
getObjFunc(T x,
unsigned int d, T u)
const {
110 for (
unsigned int d = 0; d < Dim; d++) {
111 totalPdf *=
getPdf(x[d], d);
The class that represents a distribution.
Definition Distribution.h:33
KOKKOS_INLINE_FUNCTION T getObjFunc(T x, unsigned int d, T u) const
Definition Distribution.h:92
KOKKOS_INLINE_FUNCTION T getDerObjFunc(T x, unsigned int d) const
Definition Distribution.h:100
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,...
Definition Distribution.h:75
T par_m[DimP]
Definition Distribution.h:42
KOKKOS_INLINE_FUNCTION ~Distribution()
Destructor for the Distribution class.
Definition Distribution.h:61
KOKKOS_INLINE_FUNCTION Distribution(const T *par_p)
Constructor for the Distribution class.
Definition Distribution.h:51
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,...
Definition Distribution.h:67
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,...
Definition Distribution.h:83
KOKKOS_INLINE_FUNCTION T getFullPdf(ippl::Vector< T, Dim > x) const
Definition Distribution.h:108