You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Mikkel Meyer Andersen <mi...@mikl.dk> on 2010/07/11 15:50:12 UTC

Distributions: support

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?

Cheers, Mikkel.

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


Re: Distributions: support

Posted by Mikkel Meyer Andersen <mi...@mikl.dk>.
2010/7/11 Phil Steitz <ph...@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


Re: Distributions: support

Posted by Phil Steitz <ph...@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
> 
> 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