IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
UniformDistribution.h
Go to the documentation of this file.
1// Class NormalDistribution
2// This class can be used for sampling normal distribution function
3// on bounded domain, e.g. using Inverse Transform Sampling.
4
5#ifndef IPPL_UNIFORM_DISTRIBUTION_H
6#define IPPL_UNIFORM_DISTRIBUTION_H
7
8#include <Kokkos_MathematicalConstants.hpp>
9#include <Kokkos_MathematicalFunctions.hpp>
10#include <Kokkos_Random.hpp>
11
12#include "Types/ViewTypes.h"
13
14namespace ippl {
15 namespace random {
16
17 template <typename T>
18 KOKKOS_FUNCTION T uniform_cdf_func(T x) {
19 return x;
20 }
21
22 template <typename T>
23 KOKKOS_FUNCTION T uniform_pdf_func() {
24 return 1.;
25 }
26
27 template <typename T>
28 KOKKOS_FUNCTION T uniform_estimate_func(T u) {
29 return u;
30 }
31
32 } // namespace random
33} // namespace ippl
34
35#endif
Definition Archive.h:20
KOKKOS_FUNCTION T uniform_cdf_func(T x)
KOKKOS_FUNCTION T uniform_estimate_func(T u)
KOKKOS_FUNCTION T uniform_pdf_func()