Date: Jan 26, 2013 1:38 AM
Author: Francisco Gutierrez
I managed to solve the problem, but with a rather involved strategy.
Remember: the ratio between the first and the second part is the first sorting criterion, and the size of the second part is the second criterion.
First, use Gather to create clusters of sublists according to the first criterion.
Second, use Sort to order clusters within the big list according to the fist criterion
Then, with Map (or Table) order each cluster of lists according to the second criterion
Finally, Flatten the result at level 1.
It works ok, but i wonder if its efficient, and if there is not a much simpler way to do it