MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive


  • To: mathgroup at
  • Subject: [mg129583] sorting
  • From: Francisco Gutierrez <fgutiers2002 at>
  • Date: Sat, 26 Jan 2013 01:40:16 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Reply-to: Francisco Gutierrez <fgutiers2002 at>

Dear Group:
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: sorting?
  • Next by Date: Re: NDSolve differences between mathematica 8 and 9
  • Previous by thread: Re: sorting?
  • Next by thread: Re: Setting parameters via Manipulate?