89 mt[0]=
s & 0xffffffffUL;
97 mt[
mti] &= 0xffffffffUL;
103 const std::vector<unsigned long>& seeds) {
105 Size i=1, j=0, k = (
N>seeds.size() ?
N : seeds.size());
106 for (; k != 0U; k--) {
107 mt[i] = (
mt[i] ^ ((
mt[i-1] ^ (
mt[i-1] >> 30)) * 1664525UL))
109 mt[i] &= 0xffffffffUL;
111 if (i>=
N) {
mt[0] =
mt[
N-1]; i=1; }
112 if (j>=seeds.size()) j=0;
114 for (k =
N - 1; k != 0U; k--) {
115 mt[i] = (
mt[i] ^ ((
mt[i-1] ^ (
mt[i-1] >> 30)) * 1566083941UL))
117 mt[i] &= 0xffffffffUL;
119 if (i>=
N) {
mt[0] =
mt[
N-1]; i=1; }
126 static const unsigned long mag01[2]={0x0UL,
MATRIX_A};
131 for (kk=0;kk<
N-
M;kk++) {
133 mt[kk] =
mt[kk+
M] ^ (
y >> 1) ^ mag01[
y & 0x1UL];
137 mt[kk] =
mt[(kk+
M)-
N] ^ (
y >> 1) ^ mag01[
y & 0x1UL];
140 mt[
N-1] =
mt[
M-1] ^ (
y >> 1) ^ mag01[
y & 0x1UL];
static SeedGenerator & instance()
access to the unique instance
std::size_t Size
size of a container