M=: 5500 200 [EMAIL PROTECTED] 0
   x=: 5500 [EMAIL PROTECTED] 2

   (+/x#M) -: +/(I. x){M
1
   (+/x#M) -: x +/ .* M
1

   space=: 7!:2
   space '+/x#M'
8391680
   space '+/(I. x){M'
8424512
   space 'x +/ .* M'
68736



----- Original Message -----
From: "Anssi Seppälä" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Monday, March 27, 2006 9:38 AM
Subject: [Jprogramming] Sum select of a big array ?

I am working with a rather big table ($tab is  55000 x 2000) stored
as a mapped file. +/  tab works fine, but if I call +/ to a subset of
too many elements it is out of memory (like +/ (I. x) {tab, +/
x#tab). Is there algorithm that could do the partial sum in place or
is there any method other than looping the calculation in J?


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to