36 const int RandFlat::MSBBits= 15;
 
   37 const unsigned long RandFlat::MSB= 1ul<<RandFlat::MSBBits;
 
   38 unsigned long RandFlat::staticRandomInt= 0;
 
   39 unsigned long RandFlat::staticFirstUnusedBit= 0;
 
   48   return fire( defaultA, defaultB );
 
   68                            double lx, 
double dx  )
 
   72    for (i=0; i<size; ++i)
 
   73      vect[i] = 
shoot(lx,dx);
 
   77                            const int size, 
double* vect,
 
   78                            double lx, 
double dx  )
 
   82    for (i=0; i<size; ++i)
 
   83      vect[i] = 
shoot(anEngine,lx,dx);
 
   90    for (i=0; i<size; ++i)
 
   91      vect[i] = 
fire( defaultA, defaultB );
 
   95                           double lx, 
double dx  )
 
   99    for (i=0; i<size; ++i)
 
  100      vect[i] = 
fire( lx, dx );
 
  112   outfile << 
"RANDFLAT staticRandomInt: " << staticRandomInt 
 
  113           << 
"    staticFirstUnusedBit: " << staticFirstUnusedBit << 
"\n";
 
  127   char inputword[] = 
"NO_KEYWORD    "; 
 
  131     if (strcmp(inputword,
"RANDFLAT")==0) 
break;
 
  132     if (infile.eof()) 
break;
 
  141   if (strcmp(inputword,
"RANDFLAT")==0) {
 
  146     infile >> staticRandomInt;
 
  150     infile >> staticFirstUnusedBit;
 
  156   int pr=os.precision(20);
 
  157   std::vector<unsigned long> t(2);
 
  158   os << 
" " << 
name() << 
"\n";
 
  159   os << 
"Uvec" << 
"\n";
 
  160   os << randomInt << 
" " << firstUnusedBit << 
"\n";
 
  162   os << defaultWidth << 
" " << t[0] << 
" " << t[1] << 
"\n";
 
  164   os << defaultA << 
" " << t[0] << 
" " << t[1] << 
"\n";
 
  166   os << defaultB << 
" " << t[0] << 
" " << t[1] << 
"\n";
 
  174   if (inName != 
name()) {
 
  175     is.clear(std::ios::badbit | is.rdstate());
 
  176     std::cerr << 
"Mismatch when expecting to read state of a " 
  177               << 
name() << 
" distribution\n" 
  178           << 
"Name found was " << inName
 
  179           << 
"\nistream is left in the badbit state\n";
 
  183     std::vector<unsigned long> t(2);
 
  184     is >> randomInt >> firstUnusedBit;
 
  189       is.clear(std::ios::badbit | is.rdstate());
 
  190       std::cerr << 
"\nRandFlat input failed" 
  191          << 
"\nInput stream is probably mispositioned now." << std::endl;
 
  197   is >> firstUnusedBit;
 
  198   is >> defaultWidth >> defaultA >> defaultB;
 
  204   int prec = os.precision(20);
 
  205   os << 
"RANDFLAT staticRandomInt: " << staticRandomInt 
 
  206      << 
"    staticFirstUnusedBit: " << staticFirstUnusedBit << 
"\n";
 
  215     is.clear(std::ios::badbit | is.rdstate());
 
  216     std::cerr << 
"Mismatch when expecting to read static state of a " 
  218           << 
"Name found was " << inName
 
  219           << 
"\nistream is left in the badbit state\n";
 
  226   if (keyword!=
"RANDFLAT") {
 
  227     is.clear(std::ios::badbit | is.rdstate());
 
  228     std::cerr << 
"Mismatch when expecting to read RANDFLAT bit cache info: " 
  232   is >> c1 >> staticRandomInt >> c2 >> staticFirstUnusedBit;