commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: [Math] PolynomialFunctionLagrangeForm (continued)
Date Sun, 31 Oct 2010 20:46:07 GMT
This seems like asking for trouble.

Usually interpolation requires O(n) work since lots of points are going to
be interpolated.  Adding the O(n) task of checking for sorted data
to the constructor seems like a better idea than adding a flag.  The O(n log
n) cost of sorting would only be triggered if it is needed
anyway so that isn't a real cost.

On Sun, Oct 31, 2010 at 10:05 AM, Luc Maisonobe <Luc.Maisonobe@free.fr>wrote:

> Perhaps we could add a boolean parameter isAlreadySorted or needSorting
> to the constructor and perform the sort only when needed ?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message