commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [MATH] Test failure in Continuum
Date Mon, 06 Aug 2012 18:41:22 GMT
> > [...]
> >>> 
> >>> The RandomData class (or whatever it would be called) does indeed seem useful.
If we plan to keep it, we should probably make sure that there is a sample/next/... method
in that class for EVERY distribution, as some of them are missing, if I remember correctly.
Perhaps this is a separate issue though?
> >>> 
> >> 
> >> All have the method now, but the impls delegate to RandomDataImpl.
> > 
> > They do not.
> 
> The method is in the interface.  There is a default, inversion-based implementation in
the abstract base class.  Not all distributions override the default impl.
> The ones that do delegate to the specialized methods in RandomDataImpl.
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No; as indicated before (cf. message referred to below), the distribution
classes do not delegate anymore to "RandomDataImpl", since revision 1363604
(resolution of MATH-764 and MATH-823).

> 
> > 
> >> In some cases, there is nothing better implemented than just inversion, provided
by the default inversion sampler.  That is OK.  What we need to do is just move the implementations
of the default and specialized samplers to the actual distribution classes.  These can't be
static, as they use the RamdomData instance.  I will take care of this.
> > 
> > Thanks for reading fully this message
> >  http://markmail.org/message/5fpmwyiiw2xq4o3q
> 
> I don't get the desire to make sample() static.

There is no such desire stated in that message.
The proposed static method is a "helper" that will take everything needed as
arguments. It will be defined in the appropriate distribution class, to be
called both by "sample()" from that class and by the convenience methods in
"RandomDataImpl".

> [...]


Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message