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)
@@ -461,7 +461,7 @@
-
Last revised: , at
+
Last revised: September 01, 2010 at 19:10:43 +0100
diff --git a/doc/math.qbk b/doc/math.qbk
index ca58aaa9e..8c1ce0142 100644
--- a/doc/math.qbk
+++ b/doc/math.qbk
@@ -1,12 +1,11 @@
[article Boost.Math
- [quickbook 1.4]
- [copyright 2006, 2007, 2008, 2009 John Maddock, Paul A. Bristow, Hubert Holin, Daryle Walker, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani and Thijs van den Berg]
+ [quickbook 1.5]
+ [copyright 2006, 2007, 2008, 2009, 2010 John Maddock, Paul A. Bristow, Hubert Holin, Daryle Walker, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani and Thijs van den Berg]
[license
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 http://www.boost.org/LICENSE_1_0.txt])
]
- [category math]
[authors [Maddock, John], [Bristow, Paul A.], [Holin, Hubert], [Walker, Daryle], [Zhang, Xiaogang], [Lalande, Bruno], [Råde, Johan], [Sewani, Gautam], [van den Berg, Thijs]]
[last-revision $Date$]
]
diff --git a/doc/sf_and_dist/FAQ.qbk b/doc/sf_and_dist/FAQ.qbk
new file mode 100644
index 000000000..2aeb3fa08
--- /dev/null
+++ b/doc/sf_and_dist/FAQ.qbk
@@ -0,0 +1,87 @@
+[section:faq Frequently Asked Questions FAQ]
+
+# ['I'm a FORTRAN/NAG/SPSS/SAS/Cephes/MathCad/R user and I don't see where the functions like dnorm(mean, sd) are in Boost.Math?] [br]
+Nearly all are provided, and many more like mean, skewness, quantiles, complements ...
+but Boost.Math makes full use of C++, and it looks a bit different.
+But do not panic! See section on construction and the many examples.
+Briefly, the distribution is constructed with the parameters (like location and scale)
+(things after the | in representation like P(X=k|n, p) or ; in a common represention of pdf f(x; [mu][sigma][super 2]).
+Functions like pdf, cdf are called with the name of that distribution and the random variate often called x or k.
+For example, `normal my_norm(0, 1); pdf(my_norm, 2.0);` [br]
+# ['I'm allegic to reading manuals and prefer to learn from examples.][br]
+Fear not - you are not alone! Many examples are available for functions and distributions.
+Some are referenced directly from the text. Others can be found at \boost_latest_release\libs\math\example.
+If you are a Visual Studio user, you should be able to create projects from each of these,
+making sure that the Boost library is in the include directories list.
+# ['How do I make sure that the Boost library is in the Visual Studio include directories list?][br]
+You can add an include path, for example, your Boost place /boost-latest_release,
+for example `X:/boost_1_45_0/` if you have a separate partition X for Boost releases.
+Or you can use an environment variable BOOST_ROOT set to your Boost place, and include that.
+Visual Studio before 2010 provided Tools, Options, VC++ Directories to control directories:
+Visual Studio 2010 instead provides property sheets to assist.
+You may find it convenient to create a new one adding \boost-latest_release;
+to the existing include items in $(IncludePath).
+# ['I'm a FORTRAN/NAG/SPSS/SAS/Cephes/MathCad/R user and
+I don't see where the properties like mean, median, mode, variance, skewness of distributions are in Boost.Math?][br]
+They are all available (if defined for the parameters with which you constructed the distribution) via __usual_accessors.
+# ['I am a C programmer. Can I user Boost.Math with C?][br]
+Yes you can, including all the special functions, and TR1 functions like isnan.
+They appear as C functions, by being declared as "extern C".
+# ['I am a C# (Basic? F# FORTRAN? Other CLI?) programmer. Can I use Boost.Math with C#?] [br]
+Yes you can, including all the special functions, and TR1 functions like isnan.
+But you [*must build the Boost.Math as a dynamic library (.dll) and compile with the /CLI option].
+See the boost/math/dot_net_example folder which contains an example that
+builds a simple statistical distribution app with a GUI.
+See [@http://sourceforge.net/projects/distexplorer/ Statistical Distribution Explorer] [br]
+# ['What these "policies" things for?] [br]
+Policies are a powerful (if necessarily complex) fine-grain mechanism that
+allow you to customise the behaviour of the Boost.Math library according to your precise needs.
+See __policy_section. But if, very probably, the default behaviour suits you, you don't need to know more.
+# ['I am a C user and expect to see global C-style`::errno` set for overflow/errors etc?] [br]
+You can achieve what you want - see __error_policy and __user_error_handling and many examples.
+# ['I am a C user and expect to silently return a max value for overflow?] [br]
+You (and C++ users too) can return whatever you want on overflow
+- see __overflow_error and __error_policy and several examples.
+# ['I don't want any error message for overflow etc?] [br]
+You can control exactly what happens for all the abnormal conditions, including the values returned.
+See __domain_error, __overflow_error __error_policy __user_error_handling etc and examples.
+# ['My environment doesn't allow and/or I don't want exceptions. Can I still user Boost.Math?] [br]
+Yes but you must customise the error handling: see __user_error_handling and __changing_policy_defaults .
+# ['The docs are several hundreds of pages long! Can I read the docs off-line or on paper?] [br]
+Yes - you can download the Boost current release of most documentation
+as a zip of pdfs (including Boost.Math) from Sourceforge,
+for example [@https://sourceforge.net/projects/boost/files/boost-docs/1.45.0/boost_pdf_1_45_0.tar.gz/download].
+And you can print any pages you need (or even print all pages - but be warned that there are several hundred!).
+Both html and pdf versions are highly hyperlinked.
+The entire Boost.Math pdf can be searched with Adobe Reader, Edit, Find ...
+This can often find what you seek, a partial substitute for a full index.
+# ['I want a compact version for an embedded application. Can I use float precision?] [br]
+Yes - by selecting RealType template parameter as float:
+for example normal_distribution your_normal(mean, sd);
+(But double may still be used internally, so space saving may be less that you hope for).
+You can also change the promotion policy, but accuracy might be much reduced.
+# ['I seem to get somewhat different results compared to other programs. Why?]
+We hope Boost.Math to be more accurate: our priority is accuracy (over speed).
+See the section on accuracy. But for evaluations that require iterations
+there are parameters which can change the required accuracy. You might be able to
+squeeze a little more accuracy at the cost of runtime.
+# ['Will my program run more slowly compared to other math functions and statistical libraries?]
+Probably, thought not always, and not by too much: our priority is accuracy.
+For most functions, making sure you have the latest compiler version with all optimisations switched on is the key to speed.
+For evaluations that require iteration, you may be able to gain a little more speed at the expense of accuracy.
+See detailed suggestions and results on __performance.
+# ['Where are the pre-built libraries?] [br]
+Good news - you probably don't need any! - just #include .
+But in the unlikely event that you do, see __building.
+# ['I don't see the function or distribution that I want.] [br]
+You could try an email to ask the authors - but no promises!
+
+[endsect] [/section:faq Frequently Asked Questions]
+
+[/
+ Copyright 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/background.qbk b/doc/sf_and_dist/background.qbk
index 34a0bfeb0..dca8d3276 100644
--- a/doc/sf_and_dist/background.qbk
+++ b/doc/sf_and_dist/background.qbk
@@ -3,12 +3,12 @@
[@http://en.wikipedia.org/wiki/Random_variate Random variates]
and [@http://en.wikipedia.org/wiki/Parameter distribution parameters]
are conventionally distinguished (for example in Wikipedia and Wolfram MathWorld
-by placing a semi-colon after the random variate (whose value you 'choose'),
+by placing a semi-colon after the __random_variate (whose value you 'choose'),
to separate the variate from the parameter(s) that defines the shape of the distribution.
For example, the binomial distribution has two parameters:
n (the number of trials) and p (the probability of success on one trial).
-It also has the random variate /k/: the number of successes observed.
+It also has the __random_variate /k/: the number of successes observed.
This means the probability density\/mass function (pdf) is written as ['f(k; n, p)].
Translating this into code the `binomial_distribution` constructor
@@ -18,7 +18,7 @@ therefore has two parameters:
While the function `pdf` has one argument specifying the distribution type
(which includes it's parameters, if any),
-and a second argument for the random variate. So taking our binomial distribution
+and a second argument for the __random_variate. So taking our binomial distribution
example, we would write:
pdf(binomial_distribution(n, p), k);
@@ -30,16 +30,15 @@ example, we would write:
Note that the [@http://en.wikipedia.org/wiki/Discrete_probability_distribution
discrete distributions], including the binomial, negative binomial, Poisson & Bernoulli,
are all mathematically defined as discrete functions:
-only integral values of the random variate are envisaged
+only integral values of the __random_variate are envisaged
and the functions are only defined at these integral values.
However because the method of calculation often uses continuous functions,
it is convenient to treat them as if they were continuous functions,
and permit non-integral values of their parameters.
To enforce a strict mathematical model,
-users may use floor or ceil functions on the random variate,
-prior to calling the distribution function,
-to enforce integral values.
+users may use floor or ceil functions on the __random_variate,
+prior to calling the distribution function, to enforce integral values.
For similar reasons, in continuous distributions, parameters like degrees of freedom
that might appear to be integral, are treated as real values
diff --git a/doc/sf_and_dist/building.qbk b/doc/sf_and_dist/building.qbk
index bc133550e..f2c30f161 100644
--- a/doc/sf_and_dist/building.qbk
+++ b/doc/sf_and_dist/building.qbk
@@ -1,10 +1,15 @@
-[section:building If and How to Build the Library and its Examples and Tests]
+[section:building If and How to Build a Boost.Math Library, and its Examples and Tests]
-[h4 Building the Library]
+[h4 Building a Library (shared, dynamic .dll or static .lib)]
The first thing you need to ask yourself is "Do I need to build anything at all?"
as the bulk of this library is header only: meaning you can use it just by
-#including the necessary header(s). Refer to
+#including the necessary header(s).
+
+For most simple uses,
+including a header (or few) is best for compile time and program size.
+
+Refer to
[link math_toolkit.extern_c C99 and C++ TR1 C-style Functions]
for pros and cons of using
the TR1 components as opposed to the header only ones.
@@ -15,7 +20,7 @@ using Boost.Build, from a commandline boost-root directory issue a command like:
bjam toolset=gcc --with-math install
-will do the job on Linux, while:
+that will do the job on Linux, while:
bjam toolset=msvc --with-math --build-type=complete stage
@@ -94,7 +99,7 @@ will do this automatically when appropriate.
[endsect]
[/ building.qbk
- Copyright 2006, 2007, 2008 John Maddock and Paul A. Bristow.
+ Copyright 2006, 2007, 2008, 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/common_overviews.qbk b/doc/sf_and_dist/common_overviews.qbk
index 236331ca9..b25bd9c8b 100644
--- a/doc/sf_and_dist/common_overviews.qbk
+++ b/doc/sf_and_dist/common_overviews.qbk
@@ -7,7 +7,7 @@ behaviour of this library according to your needs. There is more information
available in the [link math_toolkit.policy.pol_tutorial policy tutorial]
and the [link math_toolkit.policy.pol_ref policy reference].
-Generally speaking unless you find that the
+Generally speaking, unless you find that the
[link math_toolkit.policy.pol_tutorial.policy_tut_defaults
default policy behaviour]
when encountering 'bad' argument values does not meet your needs,
@@ -53,7 +53,7 @@ statistical distribution].
[template performance_overview[]
By and large the performance of this library should be acceptable
-for most needs. However, you should note that the library's primary
+for most needs. However, you should note that this library's primary
emphasis is on accuracy and numerical stability, and /not/ speed.
In terms of the algorithms used, this library aims to use the same "best
@@ -73,7 +73,7 @@ from this library are:
and "debug" builds can easily be a [link math_toolkit.perf.getting_best factor of 20].
# Pick your compiler carefully: [link math_toolkit.perf.comp_compilers
performance differences of up to
-8 fold] have been found between some windows compilers for example.
+8 fold] have been found between some Windows compilers for example.
The [link math_toolkit.perf performance section] contains more
information on the performance
diff --git a/doc/sf_and_dist/credits.qbk b/doc/sf_and_dist/credits.qbk
index bc708e7ae..6398b5942 100644
--- a/doc/sf_and_dist/credits.qbk
+++ b/doc/sf_and_dist/credits.qbk
@@ -30,6 +30,9 @@ Gautam Sewani coded the logistic distribution as part of a Google Summer of Code
M. A. (Thijs) van den Berg coded the Laplace distribution.
(Thijs has also threatened to implement some multivariate distributions).
+Thomas Mang requested the inverse gamma in chi squared distributions
+for Bayesian applications and helped in their implementation.
+
Professor Nico Temme for advice on the inverse incomplete beta function.
[@http://www.shoup.net Victor Shoup for NTL],
@@ -42,6 +45,10 @@ We are grateful to Joel Guzman for helping us stress-test his
program used to generate the html and pdf versions
of this document, adding several new features en route.
+Thanks to Mark Coleman and Georgi Boshnakov for spot test values
+from __Mathematica, and of course,
+to Eric Weissten for nurturing __Mathworld, an invaluable resource.
+
Plots of the functions and distributions were prepared in
[@http://www.w3.org/ W3C] standard
[@http://www.svg.org/ Scalable Vector Graphic (SVG)] format
@@ -62,7 +69,7 @@ Arnaldur Gylfason, John Phillips, Stephan Tolksdorf and Jeff Garland
[endsect] [/section:credits Credits and Acknowledgements]
[/
- Copyright 2006, 2007, 2008, 2009 John Maddock and Paul A. Bristow.
+ Copyright 2006, 2007, 2008, 2009, 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_reference.qbk b/doc/sf_and_dist/dist_reference.qbk
index 9ca5a249e..f5b036fa5 100644
--- a/doc/sf_and_dist/dist_reference.qbk
+++ b/doc/sf_and_dist/dist_reference.qbk
@@ -13,6 +13,8 @@
[include distributions/extreme_value.qbk]
[include distributions/fisher.qbk]
[include distributions/gamma.qbk]
+[include distributions/inverse_chi_squared.qbk]
+[include distributions/inverse_gamma.qbk]
[include distributions/hypergeometric.qbk]
[include distributions/laplace.qbk]
[include distributions/logistic.qbk]
@@ -121,7 +123,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..a059ad3de 100644
--- a/doc/sf_and_dist/dist_tutorial.qbk
+++ b/doc/sf_and_dist/dist_tutorial.qbk
@@ -1,4 +1,4 @@
-[/ def names end in distrib to avoid clashes]
+[/ def names all end in distrib to avoid clashes with names of functions]
[def __binomial_distrib [link math_toolkit.dist.dist_ref.dists.binomial_dist Binomial Distribution]]
[def __chi_squared_distrib [link math_toolkit.dist.dist_ref.dists.chi_squared_dist Chi Squared Distribution]]
[def __normal_distrib [link math_toolkit.dist.dist_ref.dists.normal_dist Normal Distribution]]
@@ -19,14 +19,22 @@ provides a few worked examples of applying the library to statistical tests.
All the code in this library is inside namespace boost::math.
+
In order to use a distribution /my_distribution/ you will need to include
either the header or
-the "include everything" header: .
+the "include all the distributions" header: .
For example, to use the Students-t distribution include either
or
+You also need to bring distribution names into scope,
+perhaps with a `using namespace boost::math;` declaration,
+
+or specific `using` declarations like `using boost::math::normal;` (*recommended*).
+
+[caution Some math function names are also used in namespace std so including could cause ambiguity!]
+
[endsect] [/ section:headers Headers and Namespaces]
[section:objects Distributions are Objects]
@@ -63,7 +71,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);
@@ -136,37 +149,47 @@ efficient algorithms available that are specific to random number generation.
] [/tip Random numbers that approximate Quantiles of Distributions]
For example, the binomial distribution has two parameters:
-n (the number of trials) and p (the probability of success on one trial).
+n (the number of trials) and p (the probability of success on any one trial).
The `binomial_distribution` constructor therefore has two parameters:
`binomial_distribution(RealType n, RealType p);`
-For this distribution the random variate is k: the number of successes observed.
+For this distribution the __random_variate is k: the number of successes observed.
The probability density\/mass function (pdf) is therefore written as ['f(k; n, p)].
[note
[*Random Variates and Distribution Parameters]
-[@http://en.wikipedia.org/wiki/Random_variate Random variates]
+The concept of a __random_variable is closely linked to the term __random_variate:
+a random variate is a particular value (outcome) of a random variable.
and [@http://en.wikipedia.org/wiki/Parameter distribution parameters]
-are conventionally distinguished (for example in Wikipedia and Wolfram MathWorld
-by placing a semi-colon (or sometimes vertical bar)
-after the random variate (whose value you 'choose'),
-to separate the variate from the parameter(s) that defines the shape of the distribution.
+are conventionally distinguished (for example in Wikipedia and Wolfram MathWorld)
+by placing a semi-colon or vertical bar)
+/after/ the __random_variable (whose value you 'choose'),
+to separate the variate from the parameter(s) that defines the shape of the distribution.[br]
+For example, the binomial distribution probability distribution function (PDF) is written as
+['f(k| n, p)] = Pr(K = k|n, p) = probability of observing k successes out of n trials.
+K is the __random_variable, k is the __random_variate,
+the parameters are n (trials) and p (probability).
] [/tip Random Variates and Distribution Parameters]
+[note By convention, __random_variate are lower case, usually k is integral, x if real, and
+__random_variable are upper case, K if integral, X if real. But this implementation treats
+all as floating point values `RealType`, so if you really want an integral result,
+you must round: see note on Discrete Probability Distributions below for details.]
+
As noted above the non-member function `pdf` has one parameter for the distribution object,
and a second for the random variate. So taking our binomial distribution
example, we would write:
`pdf(binomial_distribution(n, p), k);`
-The ranges of random variate values that are permitted and are supported can be
+The ranges of __random_variate values that are permitted and are supported can be
tested by using two functions `range` and `support`.
-The distribution (effectively the random variate) is said to be 'supported'
+The distribution (effectively the __random_variate) is said to be 'supported'
over a range that is
[@http://en.wikipedia.org/wiki/Probability_distribution
"the smallest closed set whose complement has probability zero"].
@@ -177,7 +200,7 @@ Outside are uninteresting zones where the pdf is zero, and the cdf zero or unity
For most distributions, with probability distribution functions one might describe
as 'well-behaved', we have decided that it is most useful for the supported range
-to exclude random variate values like exact zero *if the end point is discontinuous*.
+to *exclude* random variate values like exact zero *if the end point is discontinuous*.
For example, the Weibull (scale 1, shape 1) distribution smoothly heads for unity
as the random variate x declines towards zero.
But at x = zero, the value of the pdf is suddenly exactly zero, by definition.
@@ -412,6 +435,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 +448,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).
diff --git a/doc/sf_and_dist/distributions/binomial.qbk b/doc/sf_and_dist/distributions/binomial.qbk
index d790e1708..ec94106e3 100644
--- a/doc/sf_and_dist/distributions/binomial.qbk
+++ b/doc/sf_and_dist/distributions/binomial.qbk
@@ -323,7 +323,7 @@ the context of this distribution:
is a real-number, and not an integer. Depending on the use case you may
want to take either the floor or ceiling of the result. For example:
-`quantile(complement(binomial(n, p), P))``]]
+`quantile(complement(binomial(n, p), P))`]]
]
[h4 Examples]
diff --git a/doc/sf_and_dist/distributions/gamma.qbk b/doc/sf_and_dist/distributions/gamma.qbk
index 24b5d8adf..8568df2b6 100644
--- a/doc/sf_and_dist/distributions/gamma.qbk
+++ b/doc/sf_and_dist/distributions/gamma.qbk
@@ -127,10 +127,11 @@ and /q = 1-p/.
[[kurtosis excess][6 / k ]]
]
-[endsect][/section:normal_dist Normal]
+[endsect][/section:gamma_dist Gamma (and Erlang) Distribution]
+
[/
- 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/distributions/inverse_chi_squared.qbk b/doc/sf_and_dist/distributions/inverse_chi_squared.qbk
new file mode 100644
index 000000000..943db4295
--- /dev/null
+++ b/doc/sf_and_dist/distributions/inverse_chi_squared.qbk
@@ -0,0 +1,176 @@
+[section:inverse_chi_squared_dist Inverse Chi Squared Distribution]
+
+``#include ``
+
+ namespace boost{ namespace math{
+
+ template
+ class inverse_chi_squared_distribution
+ {
+ public:
+ typedef RealType value_type;
+ typedef Policy policy_type;
+
+ inverse_chi_squared_distribution(RealType df = 1); // Not explicitly scaled, default 1/df.
+ inverse_chi_squared_distribution(RealType df, RealType scale = 1/df); // Scaled.
+
+ RealType degrees_of_freedom()const; // Default 1.
+ RealType scale()const; // Optional scale [xi] (variance), default 1/degrees_of_freedom.
+ };
+
+ }} // namespace boost // namespace math
+
+The inverse chi squared distribution is a continuous probability distribution
+of the *reciprocal* of a variable distributed according to the chi squared distribution.
+
+The sources below give confusingly different formulae
+using different symbols for the distribution pdf,
+but they are all the same, or related by a change of variable, or choice of scale.
+
+Two constructors are available to implement both the scaled and (implicitly) unscaled versions.
+
+The main version has an explicit scale parameter which implements the
+[@http://en.wikipedia.org/wiki/Scaled-inverse-chi-square_distribution scaled inverse chi_squared distribution].
+
+A second version has an implicit scale = 1/degrees of freedom and gives the 1st definition in the
+[@http://en.wikipedia.org/wiki/Inverse-chi-square_distribution Wikipedia inverse chi_squared distribution].
+The 2nd Wikipedia inverse chi_squared distribution definition can be implemented
+by explicitly specifying a scale = 1.
+
+Both definitions are also available in Wolfram Mathematica and in __R (geoR) with default scale = 1/degrees of freedom.
+
+See
+
+* Inverse chi_squared distribution [@http://en.wikipedia.org/wiki/Inverse-chi-square_distribution]
+* Scaled inverse chi_squared distribution[@http://en.wikipedia.org/wiki/Scaled-inverse-chi-square_distribution]
+* R inverse chi_squared distribution functions [@http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/geoR/html/InvChisquare.html R ]
+* Inverse chi_squared distribution functions [@http://mathworld.wolfram.com/InverseChi-SquaredDistribution.html Weisstein, Eric W. "Inverse Chi-Squared Distribution." From MathWorld--A Wolfram Web Resource.]
+* Inverse chi_squared distribution reference [@http://reference.wolfram.com/mathematica/ref/InverseChiSquareDistribution.html Weisstein, Eric W. "Inverse Chi-Squared Distribution reference." From Wolfram Mathematica.]
+
+The inverse_chi_squared distribution is used in
+[@http://en.wikipedia.org/wiki/Bayesian_statistics Bayesian statistics]:
+the scaled inverse chi-square is conjugate prior for the normal distribution
+with known mean, model parameter [sigma][pow2] (variance).
+
+See [@http://en.wikipedia.org/wiki/Conjugate_prior conjugate priors including a table of distributions and their priors.]
+
+See also __inverse_gamma_distrib and __chi_squared_distrib.
+
+The inverse_chi_squared distribution is a special case of a inverse_gamma distribution
+with [nu] (degrees_of_freedom) shape ([alpha]) and scale ([beta]) where
+
+__spaces [alpha]= [nu] /2 and [beta] = [frac12].
+
+[note This distribution *does* provide the typedef:
+
+``typedef inverse_chi_squared_distribution inverse_chi_squared;``
+
+If you want a `double` precision inverse_chi_squared distribution you can use
+
+``boost::math::inverse_chi_squared_distribution<>``
+
+or you can write `inverse_chi_squared my_invchisqr(2, 3);`]
+
+For degrees of freedom parameter [nu],
+the (*unscaled*) inverse chi_squared distribution is defined by the probability density function (PDF):
+
+__spaces f(x;[nu]) = 2[super -[nu]/2] x[super -[nu]/2-1] e[super -1/2x] / [Gamma]([nu]/2)
+
+and Cumulative Density Function (CDF)
+
+__spaces F(x;[nu]) = [Gamma]([nu]/2, 1/2x) / [Gamma]([nu]/2)
+
+For degrees of freedom parameter [nu] and scale parameter [xi],
+the *scaled* inverse chi_squared distribution is defined by the probability density function (PDF):
+
+__spaces f(x;[nu], [xi]) = ([xi][nu]/2)[super [nu]/2] e[super -[nu][xi]/2x] x[super -1-[nu]/2] / [Gamma]([nu]/2)
+
+and Cumulative Density Function (CDF)
+
+__spaces F(x;[nu], [xi]) = [Gamma]([nu]/2, [nu][xi]/2x) / [Gamma]([nu]/2)
+
+The following graphs illustrate how the PDF and CDF of the inverse chi_squared distribution
+varies for a few values of parameters [nu] and [xi]:
+
+[graph inverse_chi_squared_pdf] [/.png or .svg]
+
+[graph inverse_chi_squared_cdf]
+
+[h4 Member Functions]
+
+ inverse_chi_squared_distribution(RealType df = 1); // Implicitly scaled 1/df.
+ inverse_chi_squared_distribution(RealType df = 1, RealType scale); // Explicitly scaled.
+
+Constructs an inverse chi_squared distribution with [nu] degrees of freedom ['df],
+and scale ['scale] with default value 1\/df.
+
+Requires that the degrees of freedom [nu] parameter is greater than zero, otherwise calls
+__domain_error.
+
+ RealType degrees_of_freedom()const;
+
+Returns the degrees_of_freedom [nu] parameter of this distribution.
+
+ RealType scale()const;
+
+Returns the scale [xi] parameter of this distribution.
+
+[h4 Non-member Accessors]
+
+All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] that are generic to all
+distributions are supported: __usual_accessors.
+
+The domain of the random variate is \[0,+[infin]\].
+[note Unlike some definitions, this implementation supports a random variate
+equal to zero as a special case, returning zero for both pdf and cdf.]
+
+[h4 Accuracy]
+
+The inverse gamma distribution is implemented in terms of the
+incomplete gamma functions like the __inverse_gamma_distrib that use
+__gamma_p and __gamma_q and their inverses __gamma_p_inv and __gamma_q_inv:
+refer to the accuracy data for those functions for more information.
+But in general, gamma (and thus inverse gamma) results are often accurate to a few epsilon,
+>14 decimal digits accuracy for 64-bit double.
+unless iteration is involved, as for the estimation of degrees of freedom.
+
+[h4 Implementation]
+
+In the following table [nu] is the degrees of freedom parameter and
+[xi] is the scale parameter of the distribution,
+/x/ is the random variate, /p/ is the probability and /q = 1-p/ its complement.
+Parameters [alpha] for shape and [beta] for scale
+are used for the inverse gamma function: [alpha] = [nu]/2 and [beta] = [nu] * [xi]/2.
+
+[table
+[[Function][Implementation Notes]]
+[[pdf][Using the relation: pdf = __gamma_p_derivative([alpha], [beta]/ x, [beta]) / x * x ]]
+[[cdf][Using the relation: p = __gamma_q([alpha], [beta] / x) ]]
+[[cdf complement][Using the relation: q = __gamma_p([alpha], [beta] / x) ]]
+[[quantile][Using the relation: x = [beta][space]/ __gamma_q_inv([alpha], p) ]]
+[[quantile from the complement][Using the relation: x = [alpha][space]/ __gamma_p_inv([alpha], q) ]]
+[[mode][[nu] * [xi] / ([nu] + 2) ]]
+[[median][no closed form analytic equation is known, but is evaluated as quantile(0.5)]]
+[[mean][[nu][xi] / ([nu] - 2) for [nu] > 2, else a __domain_error]]
+[[variance][2 [nu][pow2] [xi][pow2] / (([nu] -2)[pow2] ([nu] -4)) for [nu] >4, else a __domain_error]]
+[[skewness][4 [sqrt]2 [sqrt]([nu]-4) /([nu]-6) for [nu] >6, else a __domain_error ]]
+[[kurtosis_excess][12 * (5[nu] - 22) / (([nu] - 6) * ([nu] - 8)) for [nu] >8, else a __domain_error]]
+[[kurtosis][3 + 12 * (5[nu] - 22) / (([nu] - 6) * ([nu]-8)) for [nu] >8, else a __domain_error]]
+] [/table]
+
+[h4 References]
+
+# Bayesian Data Analysis, Andrew Gelman, John B. Carlin, Hal S. Stern, Donald B. Rubin,
+ISBN-13: 978-1584883883, Chapman & Hall; 2 edition (29 July 2003).
+
+# Bayesian Computation with R, Jim Albert, ISBN-13: 978-0387922973, Springer; 2nd ed. edition (10 Jun 2009)
+
+[endsect] [/section:inverse_chi_squared_dist Inverse chi_squared Distribution]
+
+[/
+ Copyright 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).
+]
\ No newline at end of file
diff --git a/doc/sf_and_dist/distributions/inverse_gamma.qbk b/doc/sf_and_dist/distributions/inverse_gamma.qbk
new file mode 100644
index 000000000..177f2fd87
--- /dev/null
+++ b/doc/sf_and_dist/distributions/inverse_gamma.qbk
@@ -0,0 +1,129 @@
+[section:inverse_gamma_dist Inverse Gamma Distribution]
+
+``#include ``
+
+ namespace boost{ namespace math{
+
+ template
+ class inverse_gamma_distribution
+ {
+ public:
+ typedef RealType value_type;
+ typedef Policy policy_type;
+
+ inverse_gamma_distribution(RealType shape, RealType scale = 1)
+
+ RealType shape()const;
+ RealType scale()const;
+ };
+
+ }} // namespaces
+
+The inverse_gamma distribution is a continuous probability distribution
+of the reciprocal of a variable distributed according to the gamma distribution.
+
+The inverse_gamma distribution is used in Bayesian statistics.
+
+See [@http://en.wikipedia.org/wiki/Inverse-gamma_distribution inverse gamma distribution].
+
+[@http://rss.acs.unt.edu/Rdoc/library/pscl/html/igamma.html R inverse gamma distribution functions].
+
+[@http://reference.wolfram.com/mathematica/ref/InverseGammaDistribution.html Wolfram inverse gamma distribution].
+
+See also __gamma_distrib.
+
+
+[note
+In spite of potential confusion with the inverse gamma function, this
+distribution *does* provide the typedef:
+
+``typedef inverse_gamma_distribution gamma;``
+
+If you want a `double` precision gamma distribution you can use
+
+``boost::math::inverse_gamma_distribution<>``
+
+or you can write `inverse_gamma my_ig(2, 3);`]
+
+For shape parameter [alpha] and scale parameter [beta], it is defined
+by the probability density function (PDF):
+
+__spaces f(x;[alpha], [beta]) = [beta][super [alpha]] * (1/x) [super [alpha]+1] exp(-[beta]/x) / [Gamma]([alpha])
+
+and cumulative density function (CDF)
+
+__spaces F(x;[alpha], [beta]) = [Gamma]([alpha], [beta]/x) / [Gamma]([alpha])
+
+The following graphs illustrate how the PDF and CDF of the inverse gamma distribution
+varies as the parameters vary:
+
+[graph inverse_gamma_pdf] [/png or svg]
+
+[graph inverse_gamma_cdf]
+
+[h4 Member Functions]
+
+ inverse_gamma_distribution(RealType shape = 1, RealType scale = 1);
+
+Constructs an inverse gamma distribution with shape [alpha] and scale [beta].
+
+Requires that the shape and scale parameters are greater than zero, otherwise calls
+__domain_error.
+
+ RealType shape()const;
+
+Returns the [alpha] shape parameter of this inverse gamma distribution.
+
+ RealType scale()const;
+
+Returns the [beta] scale parameter of this inverse gamma distribution.
+
+[h4 Non-member Accessors]
+
+All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] that are generic to all
+distributions are supported: __usual_accessors.
+
+The domain of the random variate is \[0,+[infin]\].
+[note Unlike some definitions, this implementation supports a random variate
+equal to zero as a special case, returning zero for pdf and cdf.]
+
+[h4 Accuracy]
+
+The inverse gamma distribution is implemented in terms of the
+incomplete gamma functions __gamma_p and __gamma_q and their
+inverses __gamma_p_inv and __gamma_q_inv: refer to the accuracy
+data for those functions for more information.
+But in general, inverse_gamma results are accurate to a few epsilon,
+>14 decimal digits accuracy for 64-bit double.
+
+[h4 Implementation]
+
+In the following table [alpha] is the shape parameter of the distribution,
+[alpha][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
+and /q = 1-p/.
+
+[table
+[[Function][Implementation Notes]]
+[[pdf][Using the relation: pdf = __gamma_p_derivative([alpha], [beta]/ x, [beta]) / x * x ]]
+[[cdf][Using the relation: p = __gamma_q([alpha], [beta] / x) ]]
+[[cdf complement][Using the relation: q = __gamma_p([alpha], [beta] / x) ]]
+[[quantile][Using the relation: x = [beta][space]/ __gamma_q_inv([alpha], p) ]]
+[[quantile from the complement][Using the relation: x = [alpha][space]/ __gamma_p_inv([alpha], q) ]]
+[[mode][[beta] / ([alpha] + 1) ]]
+[[median][no analytic equation is known, but is evaluated as quantile(0.5)]]
+[[mean][[beta] / ([alpha] - 1) for [alpha] > 1, else a __domain_error]]
+[[variance][([beta] * [beta]) / (([alpha] - 1) * ([alpha] - 1) * ([alpha] - 2)) for [alpha] >2, else a __domain_error]]
+[[skewness][4 * sqrt ([alpha] -2) / ([alpha] -3) for [alpha] >3, else a __domain_error]]
+[[kurtosis_excess][(30 * [alpha] - 66) / (([alpha]-3)*([alpha] - 4)) for [alpha] >4, else a __domain_error]]
+] [/table]
+
+[endsect][/section:inverse_gamma_dist Inverse Gamma Distribution]
+
+[/
+ Copyright 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/distributions/inverse_gamma_example.qbk b/doc/sf_and_dist/distributions/inverse_gamma_example.qbk
new file mode 100644
index 000000000..3feaa26e8
--- /dev/null
+++ b/doc/sf_and_dist/distributions/inverse_gamma_example.qbk
@@ -0,0 +1,15 @@
+
+[section:inverse_gamma_eg Inverse Gamma Distribution Bayes Example]
+
+TODO
+
+[endsect] [/section:inverse_gamma_eg Inverse Gamma Distribution Bayes Example]
+
+
+[/
+ 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/distributions/non_members.qbk b/doc/sf_and_dist/distributions/non_members.qbk
index d94874226..07bb7378e 100644
--- a/doc/sf_and_dist/distributions/non_members.qbk
+++ b/doc/sf_and_dist/distributions/non_members.qbk
@@ -1,7 +1,7 @@
[section:nmp Non-Member Properties]
Properties that are common to all distributions are accessed via non-member
-getter functions. This allows more of these functions to be added over time
+getter functions: non-membership allows more of these functions to be added over time,
as the need arises. Unfortunately the literature uses many different and
confusing names to refer to a rather small number of actual concepts; refer
to the [link concept_index concept index] to find the property you
@@ -70,7 +70,7 @@ to the integral from -infinity to x of the __pdf.
This function may return a __domain_error if the random variable is outside
the defined range for the distribution.
-For example the following graph shows the cdf for the
+For example, the following graph shows the cdf for the
normal distribution:
[$../graphs/cdf.png]
@@ -98,7 +98,7 @@ function in a call to `complement`, for example:
// print survival function for x=2.0:
std::cout << cdf(complement(norm, 2.0)) << std::endl;
-For example the following graph shows the __complement of the cdf for the
+For example, the following graph shows the __complement of the cdf for the
normal distribution:
[$../graphs/survival.png]
@@ -180,11 +180,11 @@ variate takes the value x.
This function may return a __domain_error if the random variable is outside
the defined range for the distribution.
-For example for a standard normal distribution the pdf looks like this:
+For example, for a standard normal distribution the pdf looks like this:
[$../graphs/pdf.png]
-[h4 [#math.dist.range]range]
+[h4 [#math.dist.range]Range]
template
std::pair range(const ``['Distribution-Type]``& dist);
diff --git a/doc/sf_and_dist/error_handling.qbk b/doc/sf_and_dist/error_handling.qbk
index 4ef6f6ba4..34cf033fb 100644
--- a/doc/sf_and_dist/error_handling.qbk
+++ b/doc/sf_and_dist/error_handling.qbk
@@ -54,7 +54,7 @@ appropriate result]]
]
The following tables show all the permutations of errors and actions,
-with the default action for each error shown in bold:
+with the *default action for each error shown in bold*:
[table Possible Actions for Domain Errors
[[Action] [Behaviour]]
@@ -136,14 +136,19 @@ with the default action for each error shown in bold:
this function must be defined by the user].]]
]
+All these error conditions are in namespace boost::math::policies,
+made available, for example, a by namespace declaration
+using `namespace boost::math::policies;` or individual using declarations
+`using boost::math::policies::overflow_error;`.
+
[heading Rationale]
-The flexibility of the current implementation should be reasonably obvious, the
+The flexibility of the current implementation should be reasonably obvious: the
default behaviours were chosen based on feedback during the formal review of
this library. It was felt that:
* Genuine errors should be flagged with exceptions
-rather than following C-compatible behaviour and setting ::errno.
+rather than following C-compatible behaviour and setting `::errno`.
* Numeric underflow and denormalised results were not considered to be
fatal errors in most cases, so it was felt that these should be ignored.
@@ -180,7 +185,7 @@ in use for the function that was called.
The default policy behaviour of this function is to throw a
std::domain_error C++ exception. But if the __Policy is to ignore
-the error, or set global ::errno, then a NaN will be returned.
+the error, or set global `::errno`, then a NaN will be returned.
This behaviour is chosen to assist compatibility with the behaviour of
['ISO/IEC 9899:1999 Programming languages - C]
@@ -328,8 +333,8 @@ Where
`T` is the floating-point type passed to the function, `FunctionName` is the
name of the function, `Message` is an error message describing the problem,
Val is the value for which the result is indeterminate, Default is an
-alternative default result that must be returned for ignore_error and
-errno_on_error policies, and __Policy is the current policy in use for the
+alternative default result that must be returned for `ignore_error` and
+`errno_on_erro` policies, and __Policy is the current policy in use for the
function that was called.
The default policy for this function is `ignore_error`: note that this error
@@ -351,8 +356,7 @@ Where
`T` is the floating point type passed to the function, `FunctionName` is the
name of the function, `Message` is an error message describing the problem,
`Val` is the erroneous argument,
-and __Policy is the current policy
-in use for the called function.
+and __Policy is the current policy in use for the called function.
The default behaviour of this function is to throw a `boost::math::rounding_error`.
@@ -384,7 +388,7 @@ listed above on [link overflow_error overflow],
[endsect][/section:error_handling Error Handling]
[/
- 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/fpclassify.qbk b/doc/sf_and_dist/fpclassify.qbk
index a15e627a6..a21a5a50c 100644
--- a/doc/sf_and_dist/fpclassify.qbk
+++ b/doc/sf_and_dist/fpclassify.qbk
@@ -50,7 +50,7 @@ these as macros. That mean that the following have differing meanings:
// it works for any type that has numeric_limits support for type z:
(isnan)(z);
//
- // As above but with namespace qualification.
+ // As above but with explicit namespace qualification.
(boost::math::isnan)(z);
//
// This will cause a compiler error if isnan is a native macro:
@@ -58,7 +58,7 @@ these as macros. That mean that the following have differing meanings:
// So always use instead:
(boost::math::isnan)(z);
//
- // You can also add a using statment,
+ // You can also add a using statement,
// globally to a .cpp file, or to a local function in a .hpp file.
using boost::math::isnan;
// so you can write the shorter and less cluttered
diff --git a/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.png b/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.png
new file mode 100644
index 000000000..4592e5b19
Binary files /dev/null and b/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.png differ
diff --git a/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.svg b/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.svg
new file mode 100644
index 000000000..33f61de6f
--- /dev/null
+++ b/doc/sf_and_dist/graphs/inverse_chi_squared_cdf.svg
@@ -0,0 +1,79 @@
+
+
diff --git a/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.png b/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.png
new file mode 100644
index 000000000..776eacc0a
Binary files /dev/null and b/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.png differ
diff --git a/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.svg b/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.svg
new file mode 100644
index 000000000..ce7b56ba4
--- /dev/null
+++ b/doc/sf_and_dist/graphs/inverse_chi_squared_pdf.svg
@@ -0,0 +1,72 @@
+
+
diff --git a/doc/sf_and_dist/graphs/inverse_gamma_cdf.png b/doc/sf_and_dist/graphs/inverse_gamma_cdf.png
new file mode 100644
index 000000000..d3fdf7ec7
Binary files /dev/null and b/doc/sf_and_dist/graphs/inverse_gamma_cdf.png differ
diff --git a/doc/sf_and_dist/graphs/inverse_gamma_cdf.svg b/doc/sf_and_dist/graphs/inverse_gamma_cdf.svg
new file mode 100644
index 000000000..89af2890c
--- /dev/null
+++ b/doc/sf_and_dist/graphs/inverse_gamma_cdf.svg
@@ -0,0 +1,75 @@
+
+
diff --git a/doc/sf_and_dist/graphs/inverse_gamma_pdf.png b/doc/sf_and_dist/graphs/inverse_gamma_pdf.png
new file mode 100644
index 000000000..ff2451ad4
Binary files /dev/null and b/doc/sf_and_dist/graphs/inverse_gamma_pdf.png differ
diff --git a/doc/sf_and_dist/graphs/inverse_gamma_pdf.svg b/doc/sf_and_dist/graphs/inverse_gamma_pdf.svg
new file mode 100644
index 000000000..30deecfa6
--- /dev/null
+++ b/doc/sf_and_dist/graphs/inverse_gamma_pdf.svg
@@ -0,0 +1,69 @@
+
+
diff --git a/doc/sf_and_dist/html/index.html b/doc/sf_and_dist/html/index.html
index 11dcb4526..017fce59c 100644
--- a/doc/sf_and_dist/html/index.html
+++ b/doc/sf_and_dist/html/index.html
@@ -49,11 +49,11 @@
Thijsvan den Berg
- ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22
This manual is also available in printer
- friendly PDF format.
+ friendly PDF format, and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0,
+ Classification 519.2-dc22.
Functions that are not mathematically defined, like the Cauchy mean, fail
- to compile by default. A
- policy allows control of this.
+ to compile by default. A policy
+ allows control of this.
If the policy is to permit undefined functions, then calling them throws
@@ -258,7 +258,7 @@
@@ -268,11 +268,13 @@
functions, the mid-point in a list of values.
- However a useful median approximation for distribution dist
- may be available from
+ However a useful numerical approximation for distribution dist
+ is available as usual as an accessor non-member function median using median(dist),
+ that may be evaluated (in the absence of an analytic formula) by calling
- quantile(dist,0.5).
+ quantile(dist,0.5) (this
+ is the mathematical definition of course).
@@ -514,7 +516,10 @@
in the case of serious disagreement. The accuracy, actual and claimed, vary
very widely. Only Wolfram Mathematica
functions provided a higher accuracy than C++ double (64-bit floating-point)
- and was regarded as the most-trusted source by far.
+ and was regarded as the most-trusted source by far. The The
+ R Project for Statistical Computing provided the widest range of
+ distributions, but the usual Intel X86 distribution uses 64-but doubles,
+ so our use was limited to the 15 to 17 decimal digit accuracy.
+ Equations that fit on a single line can most easily be produced by inline
+ Quickbook code using templates for Unicode Greek and Unicode Math symbols.
+ All Greek letter and small set of Math symbols is available at /boost-path/libs/math/doc/sf_and_dist/html4_symbols.qbk
+
+
+ Where equations need to use more than one line, real Math editors were used.
+
The primary source for the equations is now MathML:
see the *.mml files in libs/math/doc/sf_and_dist/equations/.
@@ -555,7 +568,7 @@
mangles these files and should not currently be used.
- Convertion to SVG was achieved using SVGMath
+ Conversion to SVG was achieved using SVGMath
and a command line such as:
$for file in *.mml; do
@@ -563,6 +576,11 @@
>>$file > $(basename $file .mml).svg
>done
+
+ See also the section on "Using Python to run Inkscape" and "Using
+ inkscape to convert scalable vector SVG files to Portable Network graphic
+ PNG".
+
Note that SVGMath requires that the mml files are not
wrapped in an XHTML XML wrapper - this is added by Mathcast by default -
@@ -713,7 +731,7 @@ done
HTML: this needs further investigation.
@@ -722,17 +740,19 @@ done
same process as the equations.
- The programs /libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp and /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp
- generate the SVG's directly using the Google
- Summer of Code 2007 project of Jacob Voytko (whose work so far is
- at .\boost-sandbox\SOC\2007\visualization).
+ The programs /libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp and
+ /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp generate
+ the SVG's directly using the Google
+ Summer of Code 2007 project of Jacob Voytko (whose work so far, considerably
+ enhanced and now reasonably mature and usable, by Paul A. Bristow, is at
+ .\boost-sandbox\SOC\2007\visualization).