Yes, that was exactly one of the planned "side-effects" :-). If some distributions prefer to generate random data in another way, explicit classes in the random-part must be made.
Yes, but I would like to avoid reflection if possible. I'll try to have a go, and send the patch proposal to the list. Cheers, Mikkel. 2009/10/27 Ted Dunning <[email protected]>: > That sounds nice. It also means that more distributions are likely to > benefit "by accident" even if they don't know to advertise what they can do. > > It is also plausible to use reflection at class construction time to > determine whether the method is available. That would let > AbstractDistribution use the inverse distribution to implement a generator > if possible. > > On Mon, Oct 26, 2009 at 3:58 PM, Mikkel Meyer Andersen <[email protected]> wrote: > >> So the best might be >> to put an inverse cd method at AbstractDistribution, and throw an >> exception, because AbstractIntegerDistribution and >> AbstractContinuousDistribution implements it. How does that sound? >> > > > > -- > Ted Dunning, CTO > DeepDyve > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
