Mercurial > hg > octave-nkf
changeset 9399:a5f6b5800f86
fix bug in recursive lookup
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 26 Jun 2009 07:13:28 +0200 |
parents | 684312a5291c |
children | df1ea906c1c4 |
files | liboctave/ChangeLog liboctave/oct-sort.cc scripts/general/interp2.m |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2009-06-26 Jaroslav Hajek <highegg@gmail.com> + + * oct-sort.cc (octave_sort<T>::lookup_merge<Comp>): Fix lower-part + recursion. + 2009-06-24 Alexander Barth <barth.alexander@gmail.com> * eigs-base.cc (EigsRealSymmetricMatrix,
--- a/liboctave/oct-sort.cc +++ b/liboctave/oct-sort.cc @@ -1861,7 +1861,7 @@ if (idx[k] - lo <= hi - idx[k]) { // The smaller portion is run recursively. - lookup_merge (data, idx[k], k, values, k, idx, comp); + lookup_merge (data, lo, idx[k], values, k, idx, comp); // Simulate a tail call. lo = idx[k]; values += k; nvalues -= k; idx += k; @@ -1871,7 +1871,7 @@ { // The smaller portion is run recursively. lookup_merge (data, idx[k], hi, - values + k, nvalues - k, idx, comp); + values + k, nvalues - k, idx + k, comp); // Simulate a tail call. hi = idx[k]; nvalues = k;