I do not know if I understand the question correctly, but I'll try
to help with the sorting stuff. I talk about radix sort, because
JCW mentioned this in his initial post. Radix sort can also be
used well on the individual columns. Just append virtual zeros to
short values. If You want to sort
Jean-Claude,
An idea that may be useful in speed thing up is illustrated below. You probably
are already aware of this method but here it is anyway. The method can clearly
be improved but I will provide a simple example to illustrate the idea.
Assumption: This example assumes that a single
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
Jean-Claude Wippler wrote:
Does anyone know how to do a multi-column sort, using column-wise
permutations?
Is this the right approach? Thinking out loud here.
A multi-column sort is really a precedence sort. You only need to sort
on a secondary or tertiary key if the primary key has
How about another stupid answer. Suppose you have N perumation columns
with M entries. Each permutation column contains the row's order if
that column was the sort column. One caveat, you will need to have
identical values have the same perumation order. In either case
Form an integer for
Brian Kelley wrote:
Jean-Claude Wippler wrote:
Does anyone know how to do a multi-column sort, using column-wise
permutations?
Is this the right approach? Thinking out loud here.
A multi-column sort is really a precedence sort. You only need to
sort on a secondary or tertiary key if the
Jean-Claude,
...snip...
To give an example - to sort on col 2, 4 reverse, and then 3 could be
done using something like this:
m2 = sortmap(col[2])
m3 = sortmap(col[3])
m4 = sortmap(col[4])
result = view.remap(m3.remap(reverse(m4)).remap(m2))
(with partial use, i.e. when fetching