[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issorted & sortrows
From: |
John W. Eaton |
Subject: |
Re: issorted & sortrows |
Date: |
Thu, 12 Feb 2009 03:54:02 -0500 |
On 12-Feb-2009, Jaroslav Hajek wrote:
| On Thu, Feb 12, 2009 at 9:02 AM, John W. Eaton <address@hidden> wrote:
|
| > removes
| > the strange comparison functions for octave_value objects from the
| > src/TEMPLATE-INST/Array-tc.cc file.
|
| Just when I was compiling my own version ... :)
| But yours is better - I've been long missing lo-traits.h, I just
| lacked the courage to create it (my version puts the traits to
| oct-sort.h). I guess maybe some of the stuff inside oct-inttypes.h can
| be moved here, so I'll abandon my version.
OK.
I had to undo the part of my change that removed the strange
comparison functions for octave_value objects from the
src/TEMPLATE-INST/Array-tc.cc file because without them I was reliably
seeing
src/data.cc ............................................error: `pso'
undefined near line 252 column 23
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error: /home/jwe/src/octave/test/fntests.m at line 252, column 3
but make check succeeds with them. I added a FIXME in this file
because these functions just seem wrong:
// FIXME -- these comparisons don't look right. Where do we sort
// octave_value objects and expect them to be character strings?
template <>
bool
octave_sort<octave_value>::ascending_compare (const octave_value& a, const
octave_value& b)
{
return (a.string_value () < b.string_value ());
}
template <>
bool
octave_sort<octave_value>::descending_compare (const octave_value& a, const
octave_value& b)
{
return (a.string_value () > b.string_value ());
}
I don't see where they are used. Does anyone have some clues for me?
jwe
- issorted & sortrows, Jaroslav Hajek, 2009/02/11
- issorted & sortrows, John W. Eaton, 2009/02/11
- Re: issorted & sortrows, Jaroslav Hajek, 2009/02/11
- Re: issorted & sortrows, John W. Eaton, 2009/02/11
- Re: issorted & sortrows, Jaroslav Hajek, 2009/02/11
- Re: issorted & sortrows, David Bateman, 2009/02/11
- Re: issorted & sortrows, John W. Eaton, 2009/02/12
- Re: issorted & sortrows, Jaroslav Hajek, 2009/02/12
- Re: issorted & sortrows,
John W. Eaton <=
- Re: issorted & sortrows, Jaroslav Hajek, 2009/02/12
- Re: issorted & sortrows, dbateman, 2009/02/12
- Re: issorted & sortrows, John W. Eaton, 2009/02/12
- Re: issorted & sortrows, Jaroslav Hajek, 2009/02/12
- Re: issorted & sortrows, John W. Eaton, 2009/02/11
Re: issorted & sortrows, Jaroslav Hajek, 2009/02/11