Skip to content

Commit

Permalink
Apply suggestions from code review to clarify about sampling from a tail
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Wilson <[email protected]>
Signed-off-by: Katie Mummah <[email protected]>
  • Loading branch information
nuclearkatie and gonuke authored Jan 17, 2024
1 parent 0f0fa2f commit b68a5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/random_number_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class NormalDoubleDist : public DoubleDistribution {
throw ValueError("Min and max cannot be equal for a normal distribution. Either use FixedDoubleDist or change the min/max.");
}
if (max_ < (mean - 3*std_dev) || min_ > (mean + 3*std_dev)) {
Warn<VALUE_WARNING>("Dist is sampling from a truncated normal more than 3 standard deviations from the mean. Drawing sampling may be inefficient");
Warn<VALUE_WARNING>("Dist is sampling from a tail of a truncated normal more than 3 standard deviations from the mean. Drawing sampling may be inefficient");
}
};
virtual double sample();
Expand Down Expand Up @@ -161,7 +161,7 @@ class NormalIntDist : public IntDistribution {
throw ValueError("Min and max cannot be equal for a normal distribution. Either use FixedIntDist or change the min/max.");
}
if (max_ < (mean - 3*std_dev) || min_ > (mean + 3*std_dev)) {
Warn<VALUE_WARNING>("Dist is sampling from a truncated normal more than 3 standard deviations from the mean. Drawing sampling may be inefficient");
Warn<VALUE_WARNING>("Dist is sampling from a tail of a truncated normal more than 3 standard deviations from the mean. Drawing sampling may be inefficient");
}
};
virtual int sample();
Expand Down

0 comments on commit b68a5c1

Please sign in to comment.