2 answers:

$.^:_1 will convert sparse to dense array, so you could store that.

 3!:1 will pack the sparse array into binary data (string/literal), and 3!:2 
will unpack it. So storing the packed string (hopefully :P) works with 1!:2

   $.(^:_1) (3!:2) 3!:1 $. i. 3 4
0 1  2  3
4 5  6  7
8 9 10 11

----- Original Message ----
From: kamakura <[EMAIL PROTECTED]>
To: Programming forum <[email protected]>
Sent: Friday, April 6, 2007 7:23:57 PM
Subject: [Jprogramming] saving sparse arrays

Hi,

I have just started to learn  J language.  It is interesting but  
difficult to read tacit form of programming.

Sparse arrays in J are very convenient for handling large sparse  
matrices.

Does anyone know how to save the sparse arrays  and restore them to  
the sparse arrays?




+++++++++++++++++++++++++++++
     Toshinari Kamakura

     Chuo University
     1-13-27 Kasuga
     Bunkyo-ku
     Tokyo 112-8551, Japan
++++++++++++++++++++++++++++++



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




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to