
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Thijs van den Berg Sent: 22 November 2008 14:48 To: boost@lists.boost.org 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? 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