Re: sort constants confusing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Tom wrote:

_tom said...

My working sorting definitions are:

Let's see.

_tom said...

stable

  • as found in msort but not in std/sort.e

"Stable" doesn't seem to be one of the definitions at all.
Unstable is just bad. So "stable" is good? Or what?
So, maybe, msort is just one of the specific sortings?
And requires more specific definition?

_tom said...

rank

  • as output by the compare function (larger or smaller) or custom_compare

Try to find rank in The Archive of RDS.
I found just "Frank Dowling".
Just 2 entries.
So, rank is not the Euphoria language word at all.
BTW, for example, I am the retired captain of the second rank
of Russian Navy, former submariner. Maybe....??? smile

_tom said...

direction

  • UP or DN (default small to large )

In classic EU (earlier 4), it is ORDER,
not direction. Direction is extra parameter.
Why?
EU works with numbers and only with numbers
and their values.
ERM reads:
"There aren't really any "characters" in Euphoria, just numbers (atoms)."

So, EU has just 2 kinds of sortings:
usual (just for numbers)
and
special (or specific) for the user defined types
(strings encoded as ascii, utf, koi8-r, unicode, etc etc).

Main EU sorting is usual, just for numbers, in two orders,
just "up" and "down".

_tom said...

order

  • the resulting sorted sequence
    • default is numerical (mathematical number line)
    • ASCII order for historical reasons
    • unicode order is what UTF8 gives you
    • natural order (as in nat_sort.zip)
    • user defined for things like sorting playing cards

No. After "default", i.e. usual, these are specific sortings, not orders.

Regards


kinz

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu