On Sun, Oct 23, 2011 at 6:50 PM, Phil Steitz <phil.ste...@gmail.com> wrote:

> On 10/23/11 4:36 PM, Ted Dunning wrote:
> > I think it isn't much to worry about forcing all the current stuff into
> an
> > unnatural structure for use cases that are not particularly common.
> >
> > The cases that I have seen for distributions over non-reals are
> permutations
> > and graphs.  In neither case did I feel an urge to file a bug against
> > java.lang.Random because it returned a primitive double.
>
> The one exception is our own IntegerDistribution, which is arguably
> being forced into an unnatural structure because its sample space is
> being artificially extended to R.  I am not sure how unnatural it
> would be to just have the probability functions take a class
> parameter.  I agree, though, that if there is no compelling
> practical need, we should keep it simple.  Could be in that case,
> though, that it might be better to pull DiscreteDistribution out of
> the hierarchy and have its probability functions take ints rather
> than doubles.  IIRC, I argued for that years ago, but others thought
> it better to go with a single-rooted hierarchy.
>

My experience with R leads me to think that integers embedded in R isn't a
big deal.  It isn't even something that I often notice.  The problem is
things that don't embed nicely in floating point representations (like
permutations).

Reply via email to