[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46265] Docs of lookup insufficient
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #46265] Docs of lookup insufficient |
Date: |
Fri, 23 Oct 2015 07:18:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #4, bug #46265 (project octave):
Why not define the behaviour and modify the semantics of lookup to return the
index of the first table entry larger than the respective entries in y? This
would then essentially be a find(table>y,1) for vector-valued y, and probably
there are even use-cases for this. I had not looked into the code, but very
probably the at-the-moment undefined behaviour of lookup is just what I
descried above. Then the new semantics would be an extension of the old ones:
if you pass in a sorted vector, which is the only allowed case now, the
results agree. Error checking should then be done at the level of the
interpolation routines.
Of course, the present lookup claims to work also for monotonically decreasing
tables. Therefore the definition of lookup will get a bit more awkward than
what I wrote above.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46265>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/