Does anyone know how to do a multi-column sort, using column-wise permutations?

I'm looking at ways to optimize sorting, based on the fact that MK has a column-wise data organization. The current sort does row-wise comparisons. Here's what I'm after:

* take the first column, sort it, and produce a permutation vector for it
* take the second column, sort it, and ...
* etc...


So you end up with N permutations vectors. Each sorts only on the specified column. Assume that the sorts are stable, i.e. identical entries are kep in input order. I'm looking for a way to combine these permutations so that the result is a permutation which represents full sort order of the entire view. Tried some ideas, but none of them seem to be right.

I've googled on the web, but can't find much relevant info (or don't grasp the theoretical foundations enough to spot the essential tricks). It would seem related to radix sorting.

D'you know what's involved or have tips on what terms to look for?

-jcw

_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to