commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [Math] Refactoring of package "analysis.integration" (MATH-501)
Date Sat, 29 Jan 2011 00:53:00 GMT
Hi.

> Seeing the code in this package i agree that some more exceptions should be
> created so as to cover cases such as the following:
> 
> >Package:
> org.apache.commons.math.analysis.integration.UnivarieteRealIntegratorImpl
> 
> >public double getResult() throws IllegalStateException {
> >        if (resultComputed) {
> >            return result;
> >        } else {
> >            throw
> MathRuntimeException.createIllegalStateException(LocalizedFormats.NO_RESULT_AVAILABLE);
> >        }
> >}

This method will be removed as part of the MATH-501 issue.

> 
> >protected void verifyInterval(double lower, double upper) throws
> >        IllegalArgumentException {
> >        if (lower >= upper) {
> >            throw MathRuntimeException.createIllegalArgumentException(
> >                    LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL,
> >                    lower, upper);
> >        }
> > }
> 
> In these two cases the exceptions thrown are not covered by any class in the
> org.apache.commons.math.exception package.

Have a look at "NumberIsTooLargeException".

> As far as the result is concerned
> the number of computations made should be defined by the user or should we
> make it an operational requirement? By the last i mean that we can mention
> to our javadoc that this calculation can be computed for 2 minutes at
> maximum...

I don't get this.


Best regards,
Gilles

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


Mime
View raw message