13 , iv(
std::move(other.iv))
19 const int ndiv = 1 + imm1 / ntab;
24 for (
int j = ntab + 8; j >= 1; --j) {
25 const int k = idum / iq1;
26 idum = ia1 * (idum - k * iq1) - k * ir1;
37 idum = ia1 * (idum - k * iq1) - k * ir1;
42 idum2 = ia2 * (idum2 - k * iq2) - k * ir2;
46 const int j = iy / ndiv;
52 return min(am * iy, rnmx);
67 return Float(inverse);
71 : primes{ 2, 3, 5, 7, 11, 13 } {
76 : primes(
std::move(other.primes))
77 , c(
std::move(other.c)) {}
#define SPH_ASSERT(x,...)
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
constexpr INLINE T max(const T &f1, const T &f2)
NAMESPACE_SPH_BEGIN constexpr INLINE T min(const T &f1, const T &f2)
Minimum & Maximum value.
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
INLINE Float radicalInverse(const int base, int i)
Random number generators.
Random number generator used in code SPH5 of Benz & Asphaug (1994).
BenzAsphaugRng(const int seed)
Float operator()(const int s=0)
Quasi-random number generator.
Float operator()(const int s)
INLINE Iterator< StorageType > end()
INLINE Iterator< StorageType > begin()
Overload of std::swap for Sph::Array.