- To: mathgroup at smc.vnet.net
- Subject: [mg129583] sorting
- From: Francisco Gutierrez <fgutiers2002 at yahoo.com>
- Date: Sat, 26 Jan 2013 01:40:16 -0500 (EST)
- Delivered-to: firstname.lastname@example.org
- Delivered-to: email@example.com
- Delivered-to: firstname.lastname@example.org
- Delivered-to: email@example.com
- Reply-to: Francisco Gutierrez <fgutiers2002 at yahoo.com>
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
Prev by Date:
Next by Date:
Re: NDSolve differences between mathematica 8 and 9
Previous by thread:
Next by thread:
Re: Setting parameters via Manipulate?