Ticket #4515: math.diff

File math.diff, 5.0 KB (added by Richard Webb <richard.webb@…>, 12 years ago)
  • libs/math/example/binomial_confidence_limits.cpp

     
    5656      // Confidence value:
    5757      cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]);
    5858      // Calculate Clopper Pearson bounds:
    59       double l = binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2);
    60       double u = binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2);
     59      double l = boost::math::binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2);
     60      double u = boost::math::binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2);
    6161      // Print Clopper Pearson Limits:
    6262      cout << fixed << setprecision(5) << setw(15) << right << l;
    6363      cout << fixed << setprecision(5) << setw(15) << right << u;
    6464      // Calculate Jeffreys Prior Bounds:
    65       l = binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2, binomial_distribution<>::jeffreys_prior_interval);
    66       u = binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2, binomial_distribution<>::jeffreys_prior_interval);
     65      l = boost::math::binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2, boost::math::binomial_distribution<>::jeffreys_prior_interval);
     66      u = boost::math::binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2, boost::math::binomial_distribution<>::jeffreys_prior_interval);
    6767      // Print Jeffreys Prior Limits:
    6868      cout << fixed << setprecision(5) << setw(15) << right << l;
    6969      cout << fixed << setprecision(5) << setw(15) << right << u << std::endl;
  • libs/math/example/binomial_sample_sizes.cpp

     
    5656      // Confidence value:
    5757      cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]);
    5858      // calculate trials:
    59       double t = binomial_distribution<>::find_maximum_number_of_trials(successes, p, alpha[i]);
     59      double t = boost::math::binomial_distribution<>::find_maximum_number_of_trials(successes, p, alpha[i]);
    6060      t = floor(t);
    6161      // Print Trials:
    6262      cout << fixed << setprecision(0) << setw(15) << right << t << endl;
  • libs/math/test/test_lognormal.cpp

     
    246246   //
    247247   // Error checks:
    248248   //
    249    BOOST_CHECK_THROW(lognormal_distribution<RealType>(0, -1), std::domain_error);
     249   BOOST_CHECK_THROW(boost::math::lognormal_distribution<RealType>(0, -1), std::domain_error);
    250250   BOOST_CHECK_THROW(pdf(dist, -1), std::domain_error);
    251251   BOOST_CHECK_THROW(cdf(dist, -1), std::domain_error);
    252252   BOOST_CHECK_THROW(cdf(complement(dist, -1)), std::domain_error);
  • libs/math/test/test_normal.cpp

     
    261261       kurtosis_excess(dist)
    262262       , static_cast<RealType>(0), tol2);
    263263
    264     normal_distribution<RealType> norm01(0, 1); // Test default (0, 1)
     264    boost::math::normal_distribution<RealType> norm01(0, 1); // Test default (0, 1)
    265265    BOOST_CHECK_CLOSE(
    266266       mean(norm01),
    267267       static_cast<RealType>(0), 0); // Mean == zero
    268268
    269     normal_distribution<RealType> defsd_norm01(0); // Test default (0, sd = 1)
     269    boost::math::normal_distribution<RealType> defsd_norm01(0); // Test default (0, sd = 1)
    270270    BOOST_CHECK_CLOSE(
    271271       mean(defsd_norm01),
    272272       static_cast<RealType>(0), 0); // Mean == zero
    273273
    274     normal_distribution<RealType> def_norm01; // Test default (0, sd = 1)
     274    boost::math::normal_distribution<RealType> def_norm01; // Test default (0, sd = 1)
    275275    BOOST_CHECK_CLOSE(
    276276       mean(def_norm01),
    277277       static_cast<RealType>(0), 0); // Mean == zero
  • libs/math/test/test_weibull.cpp

     
    318318   //
    319319   // Error checks:
    320320   //
    321    BOOST_CHECK_THROW(weibull_distribution<RealType>(0, -1), std::domain_error);
    322    BOOST_CHECK_THROW(weibull_distribution<RealType>(-1, 1), std::domain_error);
     321   BOOST_CHECK_THROW(boost::math::weibull_distribution<RealType>(0, -1), std::domain_error);
     322   BOOST_CHECK_THROW(boost::math::weibull_distribution<RealType>(-1, 1), std::domain_error);
    323323   BOOST_CHECK_THROW(pdf(dist, -1), std::domain_error);
    324324   BOOST_CHECK_THROW(cdf(dist, -1), std::domain_error);
    325325   BOOST_CHECK_THROW(cdf(complement(dist, -1)), std::domain_error);