|
Boost : |
Subject: Re: [boost] [math distributions] Laplace distribution
From: Thijs van den Berg (thijs_at_[hidden])
Date: 2008-11-29 05:05:10
Paul A. Bristow wrote:
> ons...
>
>> General relations:
>> 1) quantile(cdf(x)) == x
>> 2) hazard(x) = pdf(x)/(1-cdf(x))
>> 3) pdf(x,location,scale) = pdf( (x-location)/scale, 0, 1)/scale
>> 4) cdf(x,location,scale) = cdf( (x-location)/scale, 0, 1)
>> 5) cdf(complement(N,x)) = cdf(N(-x))
>> 6) quantile(complement(N,p)) = quantile(N(-x,1-p))
>>
>> perhaps some automatic checking (for all distribution) of error throwing
>> 7) support <-> cdf, pdf
>> 8) quantile <-> p=0, p=1
>>
>> And some generic test for distributions with specific properties Symmetric
>> distributions:
>> pdf(x) = pdf(-x)
>> cdf(x) = 1-cdf(-x)
>>
>> etc.
>> we could write template functions for that, that get passed a set of 'x'
>>
> values etc
>
> That would indeed be neat - but our tests just grew like Topsy ;-)
>
> And it would be quite a lot of work to change now.
>
>
Yes, the use of standardizing testing or all depends on the number of
developers. It the numbers grows
then at some point it might be a good idea to document a list of tests
that are needed. Currently
I'll doing fine iterating & growing the test based on feedback from you two.
A friend of mine has written a python script to automatically generate
'binding' headers from
lapac source. Perhaps at some point it would be doable to automate a lot
of that work,
but the relevance is low.
Cheers, This
files
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk