Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Partition of multi dimension list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52736] Partition of multi dimension list
  • From: "Bruyndonckx P." <pbruynd at vub.ac.be>
  • Date: Sat, 11 Dec 2004 05:21:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I have a list of about 5 million items.  Each item is a list of 7 integer numbers (hence a 5000000x7 array).  I want to partition this array on the values of two 
numbers in each item.  The third number (out of seven) goes from 0 to 63 and the fifth number is either 0 or 1.  So I want to end up with 64*2 partitions.  The 
fastest solution I have found up to now to do this on the list 'c' is Flatten[CategoryLists[c, {_}, {_}, Range[64] - 1, {_}, {0,1}, {_}, {_}][[1, 1]], 4].

Since I am not a real expert in Mathematica, can anybody suggest me a possible faster and/or cleaner  way to achieve this.

Thanks,

Peter


  • Prev by Date: Re: Newbie Question -- Plot3d::plnc
  • Next by Date: Re: Reduce[] in version 5.1
  • Previous by thread: Memory Problem
  • Next by thread: Re: Partition of multi dimension list