Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-06-27 12:07:27


Author: pbristow
Date: 2007-06-27 12:07:27 EDT (Wed, 27 Jun 2007)
New Revision: 7199
URL: http://svn.boost.org/trac/boost/changeset/7199

Log:
Revised to fit with updated docs that refer to it.

Text files modified:
   sandbox/math_toolkit/libs/math/example/binomial_example3.cpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: sandbox/math_toolkit/libs/math/example/binomial_example3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/binomial_example3.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/binomial_example3.cpp 2007-06-27 12:07:27 EDT (Wed, 27 Jun 2007)
@@ -28,7 +28,7 @@
 
 int main()
 {
- cout << "Example 3 of using the binomial distribution." << endl;
+ cout << "Example 3 of using the binomial distribution to replicate a NAG library call." << endl;
   using boost::math::binomial_distribution;
 
   // This replicates the computation of the examples of using nag-binomial_dist
@@ -59,9 +59,9 @@
   // pdf(dist, k) is equivalent to NAG library peqk probability of == k
 
   cout << " n p k plek pgtk peqk " << endl;
- binomial_distribution<>one(4, 0.5);
- cout << setw(4) << (int)one.trials() << " " << one.success_fraction() << " "<< 2 << " "
- << cdf(one, 2) << " " << cdf(complement(one, 2)) << " " << pdf(one, 2) << endl;
+ binomial_distribution<>my_dist(4, 0.5);
+ cout << setw(4) << (int)my_dist.trials() << " " << my_dist.success_fraction() << " "<< 2 << " "
+ << cdf(my_dist, 2) << " " << cdf(complement(my_dist, 2)) << " " << pdf(my_dist, 2) << endl;
   binomial_distribution<>two(19, 0.440);
   cout << setw(4) << (int)two.trials() << " " << two.success_fraction() << " " << 13 << " "
     << cdf(two, 13) << " " << cdf(complement(two, 13)) << " " << pdf(two, 13) << endl;


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