octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: review needed: binary lookup


From: Jaroslav Hajek
Subject: Re: review needed: binary lookup
Date: Thu, 27 Mar 2008 15:19:28 +0100

On Thu, Mar 27, 2008 at 12:00 PM, David Bateman
<address@hidden> wrote:
> Jaroslav Hajek wrote:
>  > hello,
>  >
>  > I would like to implement a compiled binary search for Octave that
>  > would replace the current lookup m-file implementation.
>  > Dr. Eaton asked for an independent review of this code.
>  >
>  I avoided trying to comment on this code in the past as the existing
>  lookup function isn't mine, but rather Paul Kienzle's ... However, I'd
>  say that it makes sense to accelerate the lookup function as its needed
>  for nearest and linear interpolation in all of the interpX functions and
>  these are used relatively often... If the code passes all of the
>  existing tests in use in the interpX functions, then I'd say accept it.

David,

I've followed your suggestion and tried these tests. Attached is a new changeset
that includes all the changes, i.e. the new lookup implementation
(with 2 minor corrections) as well as corrected buggy lookup calls in
interp1, interp2, interpn and ppval.
I've also added a new test for the bug corrected by this change to interp1.m.
(`assert (interp1 ([3 2 1], [3 2 2], 2.5), 2.5)')


>
>  D.
>
>
>  --
>  David Bateman                                address@hidden
>  Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph)
>  Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob)
>  91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)
>
>  The information contained in this communication has been classified as:
>
>  [x] General Business Information
>  [ ] Motorola Internal Use Only
>  [ ] Motorola Confidential Proprietary
>
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Attachment: binlookup.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]