Michael Somos on Sun, 31 Jul 2011 08:59:10 +0200


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

Re: Ser(Vecsmall(0))


> > I see no reason that lex should have
> > a problem comparing Vecsmall. Shalom,

> This one is more annoying. lex() is able to compare objects of

Sorry about that. It seemed easy in theory.

> We now (= 2.6.* testing branch) have a "universal comparison function" cmp().
> Can't one just use this ?

I am aware of the new function, but it does
not have a mathematical value. That is, if
you actually want to compare two vectors to
see if they are numerically less like you
can with lex() now. From the documentation
it seems to imply that the result of cmp()
is not the same as with lex(). I would like
to depend on the lex() functionality but to
extend it to Vecsmall type. The workaround
is to use Vec() to convert Vecsmall and then
to use lex(). Perhaps that is easier than to
actually add code to handle Vecsmall case.
Shalom, Michael