Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Kolmogorov-Smirnov needs more BOOST_MATH_STD_USING
  • Loading branch information
evanmiller committed Aug 31, 2020
commit fad891757b01855ce5966f5b9205ead293fbba8d
6 changes: 5 additions & 1 deletion include/boost/math/distributions/kolmogorov_smirnov.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace boost { namespace math {
namespace detail {
template <class RealType>
inline RealType kolmogorov_smirnov_quantile_guess(RealType p) {
RealType k = RealType(0);
RealType k;
// Choose a starting point for the Newton-Raphson iteration
if (p > 0.9) {
k = 1.8 - 5 * (1 - p);
Expand All @@ -135,6 +135,7 @@ inline RealType kolmogorov_smirnov_quantile_guess(RealType p) {
// d/dk (theta2(0, 1/(2*k*k/M_PI))/sqrt(2*k*k*M_PI))
template <class RealType, class Policy>
RealType kolmogorov_smirnov_pdf_small_x(RealType x, RealType n, const Policy&) {
BOOST_MATH_STD_USING
RealType value = RealType(0), delta = RealType(0), last_delta = RealType(0);
RealType eps = policies::get_epsilon<RealType, Policy>();
int i = 0;
Expand Down Expand Up @@ -385,6 +386,7 @@ inline RealType quantile(const kolmogorov_smirnov_distribution<RealType, Policy>

template <class RealType, class Policy>
inline RealType quantile(const complemented2_type<kolmogorov_smirnov_distribution<RealType, Policy>, RealType>& c) {
BOOST_MATH_STD_USING
static const char* function = "boost::math::quantile(const kolmogorov_smirnov_distribution<%1%>&, %1%)";
kolmogorov_smirnov_distribution<RealType, Policy> const& dist = c.dist;
RealType n = dist.number_of_observations();
Expand Down Expand Up @@ -454,6 +456,7 @@ inline RealType variance(const kolmogorov_smirnov_distribution<RealType, Policy>
template <class RealType, class Policy>
inline RealType skewness(const kolmogorov_smirnov_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING
static const char* function = "boost::math::skewness(const kolmogorov_smirnov_distribution<%1%>&)";
RealType n = dist.number_of_observations();
RealType error_result;
Expand All @@ -468,6 +471,7 @@ inline RealType skewness(const kolmogorov_smirnov_distribution<RealType, Policy>
template <class RealType, class Policy>
inline RealType kurtosis(const kolmogorov_smirnov_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING
static const char* function = "boost::math::kurtosis(const kolmogorov_smirnov_distribution<%1%>&)";
RealType n = dist.number_of_observations();
RealType error_result;
Expand Down