|
Boost Users : |
Subject: Re: [Boost-users] [random] present library status and doc
From: er (erwann.rogard_at_[hidden])
Date: 2010-02-02 09:06:55
>>
>
> So does your code solve this problem?
The current mapping applies a scaling factor to
boost::gamma_distribution and apparently the resulting empirical cdf
converges to the true cdf...
>
> I've looked at your code but I fail to create a test case. I would
> like to compare the result of your code with other tools like R,
Sure, double checking is a good idea. Among your included directories
you should have:
#include
<boost/statistics/detail/distribution_toolkit/distributions/gamma/include.hpp>
OR
#include
<boost/statistics/detail/distribution_toolkit/distributions/gamma/random.hpp>
These have to be in the search path.
/sandbox/statistics/non_parametric/
/sandbox/statistics/distribution_common/
/sandbox/statistics/distribution_toolkit/
/sandbox/statistics/random/
/usr/local/boost_1_41_0/
but I have just removed a deprecated dependency so please check out again.
To be certain, here's a small subset that I just compiled:
#include <boost/typeof/typeof.hpp>
#include <boost/random/mersenne_twister.hpp>
#include
<boost/statistics/detail/distribution_toolkit/distributions/gamma/include.hpp>
#include
<boost/statistics/detail/distribution_common/meta/random/generator.hpp>
void example_gamma(){
namespace stat = boost::statistics::detail;
namespace dist = stat::distribution;
typedef double val_;
typedef boost::mt19937 urng_;
typedef boost::math::gamma_distribution<val_> dist_;
const val_ shape = 2.0;
const val_ scale = 3.0;
dist_ d( shape, scale );
urng_ urng;
BOOST_AUTO(
vg,
dist::make_random_generator(urng,d)
);
}
Please let me know if you have any other issues.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net