[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Static storage of huge sparce matrices
From: |
Joza |
Subject: |
Static storage of huge sparce matrices |
Date: |
Fri, 2 Nov 2012 10:50:39 -0700 (PDT) |
To implement a Successive Over Relaxation scheme to iteratively solve Ax = b,
I want to statically store the sparse square matrix A which has dimensions
1000 X 1000.
The diagonal element of A is 2, and the next higher and lower off-diagonals
are both -1. All other elements are zero. Of course, in the first row, there
is no next lower off-diagonal, and no next higher off-diagonal in the last
row.
Obviously, there is no point storing all those zeros. I know that one can
use three arrays to start the elements. ARRAY_1 will store the non-zeros,
ARRAY_2 will store the columns to which the values in ARRAY_1 correspond,
and ARRAY_3 stores where each row begins in ARRAY_1.
I have no idea how I go about implementing these three arrays. How can I
create them? I know Octave has some nice functions for dealing with sparse
matrices - are there functions that I can use for this purpose?
As always, thanks for all the help, you geniuses!! :
--
View this message in context:
http://octave.1599824.n4.nabble.com/Static-storage-of-huge-sparce-matrices-tp4646029.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Static storage of huge sparce matrices,
Joza <=