commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikkel Meyer Andersen <m...@mikl.dk>
Subject Re: Distributions: support
Date Sun, 11 Jul 2010 15:13:27 GMT
2010/7/11 Phil Steitz <phil.steitz@gmail.com>:
> 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: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Mime
View raw message