simultaneous multiple key sorting algorithm

Christof Schardt christof at schardt.info
Fri Jan 27 14:35:10 PST 2012


>>> The brute force approach would essentially compute the two ranks and
>>> then sort by their sum. That's three sorts and at least one temporary

I think, you are mixing two problem levels:

Level one (theory):
How are the two properties weighted against each other
and can be combined to a total weight (a weight-function).

Level two (programming):
how can this be expressed in an optimal algorithmical way,
given D2.

Your question suggests, the the (naive) sum-function is
already the solution to level one.
But I suspect, that the solution for the problem requires
rather to find a proper weight function than a
combinatation-algorithm.

Christof











More information about the Digitalmars-d mailing list