|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-09-22 07:35:27
Author: johnmaddock
Date: 2007-09-22 07:35:26 EDT (Sat, 22 Sep 2007)
New Revision: 39476
URL: http://svn.boost.org/trac/boost/changeset/39476
Log:
Fixed gcc-compiler errors (added missing typename's).
Fixed pesky warning in normal.hpp
Text files modified:
sandbox/math_toolkit/boost/math/distributions/find_location.hpp | 12 ++++++------
sandbox/math_toolkit/boost/math/distributions/find_scale.hpp | 24 ++++++++++++------------
sandbox/math_toolkit/boost/math/distributions/normal.hpp | 6 +++---
3 files changed, 21 insertions(+), 21 deletions(-)
Modified: sandbox/math_toolkit/boost/math/distributions/find_location.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/find_location.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/find_location.hpp 2007-09-22 07:35:26 EDT (Sat, 22 Sep 2007)
@@ -83,19 +83,19 @@
{
static const char* function = "boost::math::find_location<Dist, Policy>&, %1%)";
- Dist::value_type p = c.param1;
+ typename Dist::value_type p = c.param1;
if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "Probability parameter was %1%, but must be >= 0 and <= 1!", p, policies::policy<>());
}
- Dist::value_type z = c.dist;
+ typename Dist::value_type z = c.dist;
if(!(boost::math::isfinite)(z))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "z parameter was %1%, but must be finite!", z, policies::policy<>());
}
- Dist::value_type scale = c.param2;
+ typename Dist::value_type scale = c.param2;
if(!(boost::math::isfinite)(scale))
{
return policies::raise_domain_error<typename Dist::value_type>(
@@ -112,19 +112,19 @@
{
static const char* function = "boost::math::find_location<Dist, Policy>&, %1%)";
- Dist::value_type p = c.param1;
+ typename Dist::value_type p = c.param1;
if(!(boost::math::isfinite)(p) || (p < 0) || (p > 1))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "Probability parameter was %1%, but must be >= 0 and <= 1!", p, c.param3);
}
- Dist::value_type z = c.dist;
+ typename Dist::value_type z = c.dist;
if(!(boost::math::isfinite)(z))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "z parameter was %1%, but must be finite!", z, c.param3);
}
- Dist::value_type scale = c.param2;
+ typename Dist::value_type scale = c.param2;
if(!(boost::math::isfinite)(scale))
{
return policies::raise_domain_error<typename Dist::value_type>(
Modified: sandbox/math_toolkit/boost/math/distributions/find_scale.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/find_scale.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/find_scale.hpp 2007-09-22 07:35:26 EDT (Sat, 22 Sep 2007)
@@ -72,13 +72,13 @@
//quantile(N01, 0.99) 2.32635
//quantile(N01, 0.999) 3.09023
- Dist::value_type result =
+ typename Dist::value_type result =
(z - location) // difference between desired x and current location.
/ quantile(Dist(), p); // standard distribution.
if (result <= 0)
{ // If policy isn't to throw, return the scale <= 0.
- policies::raise_evaluation_error<Dist::value_type>(function,
+ policies::raise_evaluation_error<typename Dist::value_type>(function,
"Computed scale (%1%) is <= 0!" " Was the complement intended?",
result, Policy());
}
@@ -113,32 +113,32 @@
// Checks on arguments, as not complemented version,
// Explicit policy.
- Dist::value_type q = c.param1;
+ typename Dist::value_type q = c.param1;
if(!(boost::math::isfinite)(q) || (q < 0) || (q > 1))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "Probability parameter was %1%, but must be >= 0 and <= 1!", q, c.param3);
}
- Dist::value_type z = c.dist;
+ typename Dist::value_type z = c.dist;
if(!(boost::math::isfinite)(z))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "find_scale z parameter was %1%, but must be finite!", z, c.param3);
}
- Dist::value_type location = c.param2;
+ typename Dist::value_type location = c.param2;
if(!(boost::math::isfinite)(location))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "find_scale location parameter was %1%, but must be finite!", location, c.param3);
}
- Dist::value_type result =
+ typename Dist::value_type result =
(c.dist - c.param2) // difference between desired x and current location.
/ quantile(complement(Dist(), c.param1));
// ( z - location) / (quantile(complement(Dist(), q))
if (result <= 0)
{ // If policy isn't to throw, return the scale <= 0.
- policies::raise_evaluation_error<Dist::value_type>(function,
+ policies::raise_evaluation_error<typename Dist::value_type>(function,
"Computed scale (%1%) is <= 0!" " Was the complement intended?",
result, Policy());
}
@@ -165,32 +165,32 @@
// Checks on arguments, as not complemented version,
// default policy policies::policy<>().
- Dist::value_type q = c.param1;
+ typename Dist::value_type q = c.param1;
if(!(boost::math::isfinite)(q) || (q < 0) || (q > 1))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "Probability parameter was %1%, but must be >= 0 and <= 1!", q, policies::policy<>());
}
- Dist::value_type z = c.dist;
+ typename Dist::value_type z = c.dist;
if(!(boost::math::isfinite)(z))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "find_scale z parameter was %1%, but must be finite!", z, policies::policy<>());
}
- Dist::value_type location = c.param2;
+ typename Dist::value_type location = c.param2;
if(!(boost::math::isfinite)(location))
{
return policies::raise_domain_error<typename Dist::value_type>(
function, "find_scale location parameter was %1%, but must be finite!", location, policies::policy<>());
}
- Dist::value_type result =
+ typename Dist::value_type result =
(z - location) // difference between desired x and current location.
/ quantile(complement(Dist(), q));
// ( z - location) / (quantile(complement(Dist(), q))
if (result <= 0)
{ // If policy isn't to throw, return the scale <= 0.
- policies::raise_evaluation_error<Dist::value_type>(function,
+ policies::raise_evaluation_error<typename Dist::value_type>(function,
"Computed scale (%1%) is <= 0!" " Was the complement intended?",
result, policies::policy<>()); // This is only the default policy - also Want a version with Policy here.
}
Modified: sandbox/math_toolkit/boost/math/distributions/normal.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/normal.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/normal.hpp 2007-09-22 07:35:26 EDT (Sat, 22 Sep 2007)
@@ -34,11 +34,11 @@
normal_distribution(RealType mean = 0, RealType sd = 1)
: m_mean(mean), m_sd(sd)
{ // Default is a 'standard' normal distribution N01.
- static const char* function = "boost::math::normal_distribution(const normal_distribution<%1%>&, %1%)";
+ static const char* function = "boost::math::normal_distribution<%1%>::normal_distribution";
RealType result;
- detail::check_scale("boost::math::normal_distribution<%1%>::normal_distribution", sd, &result, Policy());
- detail::check_location("boost::math::normal_distribution<%1%>::normal_distribution", mean, &result, Policy());
+ detail::check_scale(function, sd, &result, Policy());
+ detail::check_location(function, mean, &result, Policy());
}
RealType mean()const
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