|
Boost : |
Subject: Re: [boost] [math distributions] Laplace distribution
From: Thijs van den Berg (thijs_at_[hidden])
Date: 2008-11-25 08:46:16
Paul A. Bristow wrote:
>> -----Original Message-----
>> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
>>
> On
>
>> Behalf Of Thijs van den Berg
>> Sent: 22 November 2008 14:48
>> To: boost_at_[hidden]
>> Subject: Re: [boost] [math distributions] where to check for validity of
>>
> distribution
>
>> variables?
>>
>> I got a bit of Laplace code to share!
>> I still need to test the numerical results, but I compiles without
>>
> errors/warnings, and it
>
>> throws errors when parameters are invalid.
>>
>> Do I need to put the code somewhere? I've attached it to this mail...
>>
>
> Suggest you commit to sandbox
>
> Boost_sandbox\math_toolkit\boost\math\distributions
>
>
>> At the moment, I just have the code.
>>
>
>
>> It you think the code is ok,
>>
>
> Looks plausible but I've not checked in detail.
>
> > then how would I go about with documentation & testing?
>
>
>> Do you have some structure in place for that?
>>
>
>
>> I've seen quite some code in the sandbox/math, ...concept etc...
>>
>
> You need a test suite - follow the examples for similar distributions?
>
>
ok, I build a test suite & search for reference material (for the test
values). Once I have that ready,
and the test show valid results, I'll add it to the sandbox. It might
take a couple of day.
> Don't forget to say where you got the test values from (Wolfram, Matlab...)
> in comments.
> We've tried to use a variety of sources to reduce the risk of mistakes.
> I have MathCAD but it doesn't calculate Laplace I think.
>
> I find using MSVC IDE helpful for testing the test, but then you can add to
> the test jamfile.v2
>
> "Run test_laplace.cpp"
>
>
> Good idea to cut your teeth on a simple distribution before trying to run
> with a multivariate one ;-)
>
> HTH
>
> Paul
>
>
Yes, it's a great way to get an introduction on how things work here at
boost
as well as the design of the math/distribution package!
Thanks for the pointers, oops I mean references!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk