From 26475421fc4cd13ca72bf90ee5cb9ebfb6ce282c Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sun, 29 Aug 2010 18:04:08 +0000 Subject: [PATCH] Added inverse_gamma distribution [SVN r65110] --- doc/sf_and_dist/dist_reference.qbk | 3 ++- doc/sf_and_dist/dist_tutorial.qbk | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/sf_and_dist/dist_reference.qbk b/doc/sf_and_dist/dist_reference.qbk index 9ca5a249e..da64b365c 100644 --- a/doc/sf_and_dist/dist_reference.qbk +++ b/doc/sf_and_dist/dist_reference.qbk @@ -13,6 +13,7 @@ [include distributions/extreme_value.qbk] [include distributions/fisher.qbk] [include distributions/gamma.qbk] +[include distributions/inverse_gamma.qbk] [include distributions/hypergeometric.qbk] [include distributions/laplace.qbk] [include distributions/logistic.qbk] @@ -121,7 +122,7 @@ opportunity to integrate the statistical tests with this framework at some later [endsect][/section:future Extras Future Directions] [/ dist_reference.qbk - Copyright 2006 John Maddock and Paul A. Bristow. + Copyright 2006, 2010 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). diff --git a/doc/sf_and_dist/dist_tutorial.qbk b/doc/sf_and_dist/dist_tutorial.qbk index 2fd24633c..2f3be4783 100644 --- a/doc/sf_and_dist/dist_tutorial.qbk +++ b/doc/sf_and_dist/dist_tutorial.qbk @@ -19,6 +19,8 @@ provides a few worked examples of applying the library to statistical tests. All the code in this library is inside namespace boost::math. +[note Some math function names are also used in namespace std so including could cause ambiguity.] + In order to use a distribution /my_distribution/ you will need to include either the header or the "include everything" header: . @@ -63,7 +65,12 @@ in which case using the default template arguments - `RealType = double` - is nearly as convenient). Probably 95% of uses are covered by these typedefs: - using namespace boost::math; + // using namespace boost::math; // Avoid potential ambiguity with names in std + // Safer to declare specific functions with using statement(s): + + using boost::math::beta_distribution; + using boost::math::binomial_distribution; + using boost::math::students_t; // Construct a students_t distribution with 4 degrees of freedom: students_t d1(4); @@ -412,6 +419,7 @@ Now that you have the basics, the next section looks at some worked examples. [include distributions/binomial_example.qbk] [include distributions/negative_binomial_example.qbk] [include distributions/normal_example.qbk] +[include distributions/inverse_gamma_example.qbk] [include distributions/nc_chi_squared_example.qbk] [include distributions/error_handling_example.qbk] [include distributions/find_location_and_scale.qbk] @@ -424,7 +432,7 @@ Now that you have the basics, the next section looks at some worked examples. [endsect] [/ section:stat_tut Statistical Distributions Tutorial] [/ dist_tutorial.qbk - Copyright 2006 John Maddock and Paul A. Bristow. + Copyright 2006, 2010 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).