|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58189 - in sandbox/statistics/distribution_toolkit: boost/statistics/detail/distribution_toolkit/distributions/gamma boost/statistics/detail/distribution_toolkit/test/detail libs/statistics/detail/distribution_toolkit/doc libs/statistics/detail/distribution_toolkit/example
From: erwann.rogard_at_[hidden]
Date: 2009-12-06 10:33:20
Author: e_r
Date: 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
New Revision: 58189
URL: http://svn.boost.org/trac/boost/changeset/58189
Log:
m
Text files modified:
sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp | 3 ++-
sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/log_unnormalized_pdf.hpp | 4 +++-
sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/test/detail/x_f.hpp | 10 ++++++++--
sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/doc/readme.txt | 4 ++--
sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/example/distribution_function.cpp | 2 +-
5 files changed, 16 insertions(+), 7 deletions(-)
Modified: sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp
==============================================================================
--- sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp (original)
+++ sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
@@ -38,7 +38,8 @@
if(x == 0)
{
- return log(0);
+ // TODO see log_unnormalized_pdf
+ return static_cast<T>(1/0);
}
static T one_ = static_cast<T>(1);
result = (shape - one_) / x - one_ / scale;
Modified: sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/log_unnormalized_pdf.hpp
==============================================================================
--- sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/log_unnormalized_pdf.hpp (original)
+++ sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/log_unnormalized_pdf.hpp 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
@@ -38,7 +38,9 @@
if(x == 0)
{
- return log(0);
+ // TODO just a guess based on definition of math::pdf
+ // cast is needed by MSVC
+ return log(static_cast<T>(0));
}
static T one_ = static_cast<T>(1);
result = (shape - one_) * log(x) - x / scale;
Modified: sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/test/detail/x_f.hpp
==============================================================================
--- sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/test/detail/x_f.hpp (original)
+++ sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/test/detail/x_f.hpp 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
@@ -38,7 +38,10 @@
boost::fusion::pair<output1,T>
> data_type;
- template<typename D,template<typename> class F = functor::cdf_>
+ template<
+ typename D,
+ template<typename> class F = distribution::functor::cdf_
+ >
class functor{
typedef distribution::functor::cdf_<D> funct_;
public:
@@ -67,7 +70,10 @@
typedef boost::function<data_type()> generator_type;
- template<typename D,template<typename> class F = functor::cdf_>
+ template<
+ typename D,
+ template<typename> class F = distribution::functor::cdf_
+ >
struct meta_generator{
typedef functor<D,F> functor_;
typedef typename functor_::result_type res_;
Modified: sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/doc/readme.txt
==============================================================================
--- sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/doc/readme.txt (original)
+++ sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/doc/readme.txt 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
@@ -25,8 +25,8 @@
[ Platform/Compiler ]
-Mac OS Leopard 10.6 gcc version 4.0.1
-
+Mac OS X 10.6 gcc 4.2 boost_1_41_0
+Win7 V6.1.7100 Visual Studio 2010 boost_1_40_0
[ Dependencies ]
Modified: sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/example/distribution_function.cpp
==============================================================================
--- sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/example/distribution_function.cpp (original)
+++ sandbox/statistics/distribution_toolkit/libs/statistics/detail/distribution_toolkit/example/distribution_function.cpp 2009-12-06 10:33:19 EST (Sun, 06 Dec 2009)
@@ -37,7 +37,7 @@
void example_distribution_function(std::ostream& out){
- out << "-> example_math_location_scale" << std::endl;
+ out << "-> example_distribution_function" << std::endl;
using namespace boost;
using namespace math;
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