commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: Fwd: Solver deprecations in common maths 2.2
Date Mon, 11 Apr 2011 10:15:46 GMT
Hi.

On Mon, Apr 11, 2011 at 01:39:51AM -0700, Henri Yandell wrote:
> Noting that this didn't get a reply.

I had not seen it pass. [Mails from "commons" are sometimes rejected by my
provider under the (false) assumption that they are spam...]
 
> ---------- Forwarded message ----------
> From: Olivier Lefevre <lefevrol@yahoo.com>
> Date: Thu, Mar 31, 2011 at 12:15 AM
> Subject: Solver deprecations in common maths 2.2
> To: user@commons.apache.org
> 
> 
> All solve methods of UnivariateRealSolver are now deprecated: two
> were deprecated in 2.0 and their replacements were themselves
> deprecated in 2.2. If this isn't a documentation bug, how then
> are we supposed to call an UnivariateRealSolver ???

The replacement methods (in the development branch, to be released as 3.0)
could not be incorporated into 2.2 because it would have broken backward
compatibility.
While using 2.2, you will have to call "@deprecated" methods. And they won't
be available anymore when you upgrade to 3.0. Sorry for the upgrade
inconvenience.

> Furthermore the Javadocs for this class offer this example:
> "BrentSolver solver = factory.newBrentSolver();" but newBrentSolver
> returns an UnivariateRealSolver, not a BrentSolver!

In fact, this example is in "UnivariateRealSolverFactory.java". You are
right that it contradicts the code, which would be better if the type of
the returned value was indeed "BrentSolver".
However please note that this class is going to disappear in the upcoming
version 3.0. Somehow, we missed to add a deprecation warning.

> In short, the state of the documentation is really confusing.

The whole package was refactored:
  https://issues.apache.org/jira/browse/MATH-439
Hence, not much attention was dedicated to fix things in a file doomed to
deletion.


HTH,
Gilles

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


Mime
View raw message