#include <subtract_with_carry_engine.hpp>
template<class UIntType, size_t word_size, size_t short_lag, size_t long_lag>
class std::subtract_with_carry_engine< UIntType, word_size, short_lag, long_lag >
◆ result_type
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
◆ subtract_with_carry_engine()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
void seed(size_t sd=default_seed)
Definition: subtract_with_carry_engine.hpp:61
◆ discard()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
72 for (; z != 0ULL; --z)
73 (*this).operator ()();
◆ last()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
◆ max()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
94 {
return (UIntType(1) << word_size) - 1; }
◆ min()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
◆ operator()()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
79 int short_index = m_p - short_lag;
80 short_index += (short_index < 0) ? long_lag : 0;
81 if (m_x[short_index] >= m_x[m_p] + m_carry) {
82 m_xlast = m_x[short_index] - m_x[m_p] - m_carry;
85 m_xlast = modulus - m_x[m_p] - m_carry + m_x[short_index];
88 m_x[m_p] = m_xlast; ++m_p;
◆ seed()
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
63 40014u, 0u, 2147483563u> e(sd == 0u ?
default_seed : sd);
65 result_type mds = (UIntType(1) << word_size);
66 for(
size_t i = 0; i < long_lag; ++i)
67 m_x[i] = internal::mod<result_type, 1, 0, mds>(e());
68 m_carry = (m_x[long_lag-1] == 0);
UIntType result_type
Definition: subtract_with_carry_engine.hpp:54
static constexpr size_t default_seed
Definition: subtract_with_carry_engine.hpp:55
◆ default_seed
template<class UIntType , size_t word_size, size_t short_lag, size_t long_lag>
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: