A suggestion

Richard A. O'Keefe ok at cs.otago.ac.nz
Thu Mar 14 23:10:47 UTC 2002


	Can you give an example where this ordering would be useful?
	
I'm using it in a data mining algorithm that needs to sort a
collection of sequences so that sequences which share a common
prefix are adjacent.

    The fact that lexicographic order brings things with common prefixes
    together is what makes it, in my view, the most often useful comparison
    for sequences.

There's another data mining algorithm I'm going to use which needs
a large but sparse multidimensional array which it will build and
traverse once.  Again, stashing the (index tuple , {value}) items
in a sequence and then sorting it turns out to be an efficient way
to do the job.

If I'd had this back when I wrote my code for sorting XML, I'd have used it.

Frankly, I've lost track of the uses I've put sequence comparison to
over the years in other languages.  Once you have it, you find uses for it.




More information about the Squeak-dev mailing list