17 #ifdef USE_FACTORY_AUTOREGISTER
19 bool init = RandomNumbers_Mseries::register_factory();
48 for (
int i = 0; i < IP; ++i) {
55 for (
int j = 0; j < IP; ++j) {
58 for (
int i = 0; i < 32; ++i) {
59 iwork = iwork * 2 + IB[JR];
60 IB[JR] = IB[JR] ^ IB[KR];
91 unsigned IWK[2 *
Np - 1];
97 for (
int i = 0; i < IP; ++i) {
101 for (
int i = IP; i < 2 * IP - 1; ++i) {
102 IWK[i] = IWK[i - IP] ^ IWK[i - IQ];
105 for (
int i = 0; i < MU; ++i) {
112 if (M <= IP - 1)
goto continued300;
119 for (
int i = 0; i < IP; ++i) {
124 for (
int j = NB; j >= 0; --j) {
125 for (
int i = IP - 1; i >= 0; --i) {
126 C[2 * i + IB[j]] = C[i];
127 C[2 * i + 1 - IB[j]] = 0;
129 for (
int i = 2 * IP - 1; i >= IP; --i) {
130 C[i - IP] = C[i - IP] ^ C[i];
131 C[i - IQ] = C[i - IQ] ^ C[i];
135 for (
int j = 0; j < IP; ++j) {
137 for (
int i = 0; i < IP; ++i) {
138 iwork = iwork ^ (C[i] * IWK[j + i]);
151 std::ofstream outfile;
152 outfile.open(filename.c_str());
159 outfile <<
" " <<
jr <<
" " <<
kr << std::endl;
161 for (
int i = 0; i <
Np; i++) {
162 outfile <<
" " <<
w[i] << std::endl;
176 std::ifstream infile;
177 infile.open(filename.c_str());
186 for (
int i = 0; i <
Np; i++) {