4 #define Alphabet "qwertyuiopasdfghjklzxcvbnm0123456789"
13 std::stringstream msg;
14 msg<<
"Your string seed \""<<stSeed<<
"\" is shorter than 5 char";
15 err.SetDescription(msg.str());
32 const char* StringAlphabet =
Alphabet;
33 int length= word.length();
35 for (
int i=0; i<length; i++){
36 for (
int iAlphabet=0; iAlphabet<26+10; iAlphabet++){
37 if ( word[i] == StringAlphabet[iAlphabet] ){
47 if (seed<1 || seed>8000) {
49 std::stringstream msg;
50 msg<<
"Your numeric seed \""<<seed<<
"\" is out of the 1-8000 range";
51 err.SetDescription(msg.str());
59 unsigned int jRan = (seed*ia + ic) % im;
61 jRan = (jRan*ia + ic) % im;
62 jRan = (jRan*ia + ic) % im;
63 jRan = (jRan*ia + ic) % im;
65 double theRan = (float) jRan / (
float) im;
error class with error type and description