[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    Re: [Math] PolynomialFunctionLagrangeForm (continued)
From:       Ted Dunning <ted.dunning () gmail ! com>
Date:       2010-10-31 20:46:07
Message-ID: AANLkTimJLdD4043GKyMHxWSdt=CeYezLRbwNAVT2OxnJ () mail ! gmail ! com
[Download RAW message or body]


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 ?
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic