IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool > Struct Template Reference

Functor that is used for generating samples. More...

#include <InverseTransformSampling.h>

Collaboration diagram for ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >:

Public Types

using value_type = T

Public Member Functions

KOKKOS_FUNCTION fill_random (Distribution &dist_r, view_type &x_r, GeneratorPool &rand_pool_r, Vector< T, Dim > &umin_r, Vector< T, Dim > &umax_r, unsigned int &d_r)
 Constructor for the fill_random functor.
KOKKOS_INLINE_FUNCTION void operator() (const size_t i) const
 Operator to fill random values.

Public Attributes

Distribution targetdist_m
view_type sample_m
GeneratorPool pool_m
Vector< T, Dimminbound_m
Vector< T, Dimmaxbound_m
unsigned int dim_m

Detailed Description

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
struct ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >

Functor that is used for generating samples.

Definition at line 172 of file InverseTransformSampling.h.

Member Typedef Documentation

◆ value_type

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
using ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::value_type = T

Definition at line 173 of file InverseTransformSampling.h.

Constructor & Destructor Documentation

◆ fill_random()

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
KOKKOS_FUNCTION ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::fill_random ( Distribution & dist_r,
view_type & x_r,
GeneratorPool & rand_pool_r,
Vector< T, Dim > & umin_r,
Vector< T, Dim > & umax_r,
unsigned int & d_r )
inline

Constructor for the fill_random functor.

Parameters
dist_The distribution to sample from.
x_The view to generate samples in.
rand_pool_The random number generator pool.
umin_Minimum cumulative distribution values.
umax_Maximum cumulative distribution values.

Definition at line 191 of file InverseTransformSampling.h.

References dim_m, maxbound_m, minbound_m, pool_m, sample_m, and targetdist_m.

Member Function Documentation

◆ operator()()

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
KOKKOS_INLINE_FUNCTION void ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::operator() ( const size_t i) const
inline

Operator to fill random values.

Parameters
iIndex for the random values.

Definition at line 205 of file InverseTransformSampling.h.

References dim_m, maxbound_m, minbound_m, pool_m, sample_m, ippl::random::detail::NewtonRaphson< T, Distribution >::solve(), and targetdist_m.

Here is the call graph for this function:

Member Data Documentation

◆ dim_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
unsigned int ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::dim_m

Definition at line 179 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().

◆ maxbound_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
Vector<T, Dim> ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::maxbound_m

Definition at line 178 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().

◆ minbound_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
Vector<T, Dim> ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::minbound_m

Definition at line 177 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().

◆ pool_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
GeneratorPool ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::pool_m

Definition at line 176 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().

◆ sample_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
view_type ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::sample_m

Definition at line 175 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().

◆ targetdist_m

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
Distribution ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::targetdist_m

Definition at line 174 of file InverseTransformSampling.h.

Referenced by fill_random(), and operator()().


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