Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78579 - trunk/boost/math/distributions
From: pbristow_at_[hidden]
Date: 2012-05-24 07:13:55


Author: pbristow
Date: 2012-05-24 07:13:54 EDT (Thu, 24 May 2012)
New Revision: 78579
URL: http://svn.boost.org/trac/boost/changeset/78579

Log:
Added Policy as a template parameter to functors and #6934 test program now compiles and runs.

Need to commit changes to concept checks to confirm.
Text files modified:
   trunk/boost/math/distributions/inverse_gaussian.hpp | 16 ++++++++--------
   1 files changed, 8 insertions(+), 8 deletions(-)

Modified: trunk/boost/math/distributions/inverse_gaussian.hpp
==============================================================================
--- trunk/boost/math/distributions/inverse_gaussian.hpp (original)
+++ trunk/boost/math/distributions/inverse_gaussian.hpp 2012-05-24 07:13:54 EDT (Thu, 24 May 2012)
@@ -207,11 +207,11 @@
    return result;
 } // cdf
 
-template <class RealType>
+template <class RealType, class Policy>
 struct inverse_gaussian_quantile_functor
 {
 
- inverse_gaussian_quantile_functor(const boost::math::inverse_gaussian_distribution<RealType> dist, RealType const& p)
+ inverse_gaussian_quantile_functor(const boost::math::inverse_gaussian_distribution<RealType, Policy> dist, RealType const& p)
     : distribution(dist), prob(p)
   {
   }
@@ -224,14 +224,14 @@
     return boost::math::make_tuple(fx, dx);
   }
   private:
- const boost::math::inverse_gaussian_distribution<RealType> distribution;
+ const boost::math::inverse_gaussian_distribution<RealType, Policy> distribution;
   RealType prob;
 };
 
-template <class RealType>
+template <class RealType, class Policy>
 struct inverse_gaussian_quantile_complement_functor
 {
- inverse_gaussian_quantile_complement_functor(const boost::math::inverse_gaussian_distribution<RealType> dist, RealType const& p)
+ inverse_gaussian_quantile_complement_functor(const boost::math::inverse_gaussian_distribution<RealType, Policy> dist, RealType const& p)
     : distribution(dist), prob(p)
   {
   }
@@ -245,7 +245,7 @@
     return boost::math::make_tuple(fx, dx);
   }
   private:
- const boost::math::inverse_gaussian_distribution<RealType> distribution;
+ const boost::math::inverse_gaussian_distribution<RealType, Policy> distribution;
   RealType prob;
 };
 
@@ -347,7 +347,7 @@
   boost::uintmax_t m = policies::get_max_root_iterations<Policy>(); // and max iterations.
   using boost::math::tools::newton_raphson_iterate;
   result =
- newton_raphson_iterate(inverse_gaussian_quantile_functor<RealType>(dist, p), guess, min, max, get_digits, m);
+ newton_raphson_iterate(inverse_gaussian_quantile_functor<RealType, Policy>(dist, p), guess, min, max, get_digits, m);
    return result;
 } // quantile
 
@@ -428,7 +428,7 @@
   boost::uintmax_t m = policies::get_max_root_iterations<Policy>();
   using boost::math::tools::newton_raphson_iterate;
   result =
- newton_raphson_iterate(inverse_gaussian_quantile_complement_functor<RealType>(c.dist, q), guess, min, max, get_digits, m);
+ newton_raphson_iterate(inverse_gaussian_quantile_complement_functor<RealType, Policy>(c.dist, q), guess, min, max, get_digits, m);
    return result;
 } // quantile
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk