Oh, yess. That good old APL dot product. It's been a long time when I
used it last time. It works fine with the mapped file. Thanks for the tip!
At 21:11 27.3.2006, you wrote:
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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm