commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject [Math] PolynomialFunctionLagrangeForm (continued)
Date Sun, 31 Oct 2010 14:08:51 GMT
Hi.

[Continued from the previous message.]

Accepting that the interpolation abscissae are not sorted in strictly
increasing order make it necessary to check (at every call to the "value"
method) that no 2 interpolating points are the same.
The code would be cleaner is we assume (as a pre-condition) that the "x"
interval is sorted. [And it would be more similar to other interpolating
classes that explicitely prohibit unsorted interpolation intervals.]

If we nevertheless want to allow the user to pass an unsorted interval, I'd
rather have a new utility method that would sort the "x" interval (and apply
the corresponding permutations to "y") within the constructor.


Gilles

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


Mime
View raw message