2010/7/11 Phil Steitz <[email protected]>:
> Mikkel Meyer Andersen wrote:
>> Dear Community,
>>
>> I'm planning to implement lower and upper bounds of the support for
>> distributions in a generic way on AbstractContinuousDistribution and
>> AbstractIntegerDistribution such that one can get e.g. 0 and n for the
>> Binomial, -inf and inf of the Normal etc.? Proposed names for the
>> methods are getSupportLowerBound and getSupportUpperBound. For
>> AbstractContinuousDistribution they should return a double and on
>> AbstractIntegerDistribution an int.
>>
>> Are there any comments on this proposal?
>
> +1 - have a look at the getDomainLowerBound(double) and
> getDomainUpperBound(double).  In theory, the new methods could be
> implemented by passing 0 or 1 to these methods.  Some
> implementations at least behave that way now.  It might be good to
> amend the implementations and eventually (in 3.0) the contracts of
> these methods to behave that way uniformly, in which case
> implementation could reside there.
>
> +1 in any case to add the new methods.  Thanks!
>
> Phil
In theory I agree that using getDomain...(), but I'm not sure if it is
clever to neglect the difference between Double.POSITIVE_INFINITY and
Double.MAX_VALUE where the latter is used in getDomain...()? What do
you think taking this into account? I myself would prefer to get
Double.POSITIVE_INFINITY if that really is the case, and then later
convert it to Double.MAX_VALUE if necessary.
- Mikkel.
>>
>> Cheers, Mikkel.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to