octave-maintainers
[Top][All Lists]
Advanced

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

unapplied patches


From: John W. Eaton
Subject: unapplied patches
Date: Tue, 25 Mar 2008 21:03:48 -0400

On 25-Mar-2008, Jaroslav Hajek wrote:

| binary lookup:
| 
| https://www.cae.wisc.edu/pipermail/octave-maintainers/2008-March/006495.html
| 
| John didn't like the original code driven by gotos - admittedly, it
| was not quite clear. This version is rewritten using STL's <algorithm>
| an <functional> template libraries - it had become almost
| self-documenting thus (at least if you're familiar with STL and its
| metaprogramming) I'm not sure about Octave's attitude to STL though

We generally want to use standard containers and algorithms where
possible.

| I'd really like to see a true binary search in Octave (i.e. one with
| logarithmic complexity per search, rather than linear-at-best as with
| the current version), in this way or another. This version (based on
| binary search, but optimized for downsampling) will outperform the
| current version in most (if not all) cases, so I think it is a viable
| approach.
| 
| The above message also points out a corner case when using lookup with
| the expression `lookup(x(2:end-1))+1', that makes most of
| interpolation functions buggy. This really needs to be fixed.
| 
| Since the `lookup(x(2:end-1))+1` usage is the most common, I was
| thinking about making this kind of usage an option to lookup, rather
| than using different expression, something like
| lookup (table, y, 'lr'), where options mean: 'l' - treat the leftmost
| value as negative infinity (i.e. always return at least 1)
| treat the rightmost value as positive infinity (i.e. always return at
| most length(table)-1).
| 
| If John agrees, I'll resubmit my lookup with these options supported
| and then submit a fix for interp1, interp2 etc. to use this new style.

| pchip interpolation method for interp2
| 
| https://www.cae.wisc.edu/pipermail/octave-maintainers/2008-March/006471.html
| 
| this was documented as missing in interp2. Similar to bicubic, but
| uses SLATEC's dpchim to preserve monotonicity.
| Also cleans up the code in interp2 and adds more demos.

I'm not really familiar with either of these functions, so it would be
helpful if someone else could comment on these patches before I
include them.

Thanks,

jwe


reply via email to

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