48 return std::floor(DBL_MANT_DIG * 0.30102999566398) + 2;
61 for (
int i = 1; i < length; i++) {
66 double returnVal = atof(temp);
97 for (
unsigned int i = 0; i < shapeFamilies.size(); i++) {
98 switch (shapeFamilies[i].distributionType) {
114 std::cout <<
"\n\nWARNING: The defined minimum value, " << shapeFamilies[i].expMin
115 <<
", for " <<
shapeType(shapeFamilies[i])
117 <<
" will not be able to be produced by the exponential distribution due to precision issues.\n";
119 std::cout <<
"The minimum value is too large. The largest value the distribution can " 120 <<
"produce with current parameters is " 123 std::cout <<
"Please adjust the minimum value, or the mean, and try again.\n";
127 shapeFamilies[i].minDistInput = input;
134 std::cout <<
"\n\nWARNING: The defined maximum value, " << shapeFamilies[i].expMax <<
", for " 136 <<
" will not be able to be produced by the exponential distribution due to precision issues.\n";
138 std::cout <<
"The largest value the distribution can produce with current parameters is " 141 std::cout <<
"Press Enter to automatically adjust this exponential maximum value to " 148 if (max <= shapeFamilies[i].expMin) {
149 std::cout <<
"ERROR: The maximum exponetnial distribution radius possible for " <<
shapeType(shapeFamilies[i])
151 <<
" is less than or equal to the minimum exponential distribution radius.\n";
152 std::cout <<
"Please adjust the exponential distribution parameters in " <<
shapeType(shapeFamilies[i])
153 <<
" family " <<
getFamilyNumber(i, shapeFamilies[i].shapeFamily) <<
"\n";
158 shapeFamilies[i].maxDistInput = input;
177 std::cin.get(str, 256);
181 if ((str[0] ==
'q' && str[1] ==
'\0') || (str[0] ==
'Q' && str[1] ==
'\0')) {
186 std::cout <<
"Invalid input.\n";
189 }
while (str[0] != 0);
double getMaxDecimalForDouble()
std::string shapeType(struct Shape &shapeFam)
void checkDistributionUserInput(std::vector< Shape > &shapeFamilies)
int getFamilyNumber(int familyIndex, int familyShape)
double getMaxValue(double lambda)
Distributions(std::mt19937_64 &_generator, std::vector< Shape > &shapeFamilies)
double computeInput(double output, double lambda)