Boost logo

Boost :

Subject: Re: [boost] [math distributions] Laplace distribution
From: Thijs van den Berg (thijs_at_[hidden])
Date: 2008-11-28 06:00:27


Paul A. Bristow wrote:
>> -----Original Message-----
>> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
>>
> On
>
>> Behalf Of Thijs van den Berg
>> Sent: 27 November 2008 20:59
>> To: boost_at_[hidden]
>> Subject: Re: [boost] [math distributions] Laplace distribution
>>
>> I solved those by changing
>>
>>> int test_main(int, char* [])
>>>
>> into
>>
>>> BOOST_AUTO_TEST_CASE( test1 )
>>>
>> hope that's ok...
>>
>
> More than - an improvement - using the latest recommended way of starting
> Boost.Test
>
>
>> Anyway, I'll be able to add some validated code to the sandbox soon.
>>
>
> Ping when committed.
>
>
I will
> PS Take care to follow other distribution tests as examples - there are
> several of pits (into which I have fallen, serially)
>
>
I now have some specific test for the pdf, cdf values

 but also some generic test like
quantile(cdf(x))==x
hazard(x)=pdf(x)/(1-cdf(x))

U still need to do the error triggering checks and find more refeence
values. I'll take a good look at the other
tests so look for the other pitfalls
> Since I think the formulae only use built-in functions like exp, they should
> be quite accurate and you should be able to set the tolerance as a few eps
> even when round tripping.
>
> Don't forget too that (for full portability) constants should be declared
> and long double
>
> static_cast<RealType>(0.53958342416056554201085167134004L)
>
> (unless they are 'exactly representable' like 0.5, 0.25...)
>
>
good point!
>> After that ...multi-dim-Gaussian's!
>>
>
> Now the real fun will begin!
>
>
indeed... the matrix interface will be difficult part. Oh boy..I'm
thinking that it would be nice to have:
* default matrix storage & default matrix operators..
That way, it works stand-alone without the hassle of dependencies

* abstraction via bindings,
Give users tthe option to use uBlas, Atlas, lapack etc. instead of the
simple internal matrix operators

but that design needs quite a bit of thinking..
> Paul
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
SITMO Quantitative Financial Consultancy - Software Development
M.A. (Thijs) van den Berg
Tel.+31 (0)6 2411 0061
Fax.+31 (0)15 285 1984
thijs_at_[hidden] <mailto:thijs_at_[hidden]> - www.sitmo.com 
<http://www.sitmo.com>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk