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. On Sun, Oct 23, 2011 at 2:15 PM, Phil Steitz <phil.ste...@gmail.com> wrote: > Comments on [math-692] have made me curious about how might we run > into discrete distributions that do not extend > AbstractIntegerDistribution in practical applications. Does anyone > have the need for this? One reason that I am asking about this is > that I have always felt a little funny about basically forcing > sample spaces of probability spaces to be subsets of R by the setup > we have. The way we are forced to remap values in > IntegerDistribution is a little smelly and to actually compute > anything for discrete distributions in the current setup, their > sample spaces have to be mapped to some subset of the integers. I > like the setup for classical continuous distributions over R and can > live with it for discrete distributions over Z, which is all that we > have ever implemented. To model the more general case, we would > have to parameterize the type of the sample space. This may make > sense and have value in the discrete case; but if done at the top of > the hierarchy it would complicate things for the currently > implemented distributions and force use of Double everywhere in > place of double. If the only practical use case we can identify is > discrete distributions over non-Integer domains, we could just > create some kind of adapter. Any thoughts on this? > > Phil > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > >