|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65017 - trunk/libs/math/example
From: pbristow_at_[hidden]
Date: 2010-08-26 09:29:31
Author: pbristow
Date: 2010-08-26 09:29:29 EDT (Thu, 26 Aug 2010)
New Revision: 65017
URL: http://svn.boost.org/trac/boost/changeset/65017
Log:
Removed "using namespace ...;" to try to avoid ambiguity in name binomial_distribution which is the std:: (random) and boost::math
Text files modified:
trunk/libs/math/example/binomial_confidence_limits.cpp | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
Modified: trunk/libs/math/example/binomial_confidence_limits.cpp
==============================================================================
--- trunk/libs/math/example/binomial_confidence_limits.cpp (original)
+++ trunk/libs/math/example/binomial_confidence_limits.cpp 2010-08-26 09:29:29 EDT (Thu, 26 Aug 2010)
@@ -1,4 +1,6 @@
// Copyright John Maddock 2006
+// Copyright Paul A. Bristow 2010
+
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
@@ -11,7 +13,11 @@
#endif
#include <iostream>
+using std::cout; using std::endl;
#include <iomanip>
+using std::fixed; using std::left; using std::right; using std::right; using std::setw;
+using std::setprecision;
+
#include <boost/math/distributions/binomial.hpp>
void confidence_limits_on_frequency(unsigned trials, unsigned successes)
@@ -21,11 +27,11 @@
// successes = Total number of observed successes.
//
// Calculate confidence limits for an observed
- // frequency of occurrence that follows a binomial
- // distribution.
+ // frequency of occurrence that follows a binomial distribution.
//
- using namespace std;
- using namespace boost::math;
+ //using namespace std; // Avoid
+ // using namespace boost::math; // potential name ambiguity with std <random>
+ using boost::math::binomial_distribution;
// Print out general info:
cout <<
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