A
adam.kleinbaum
Hi there,
I'm a novice C programmer working with a series of large (30,000 x
30,000) sparse matrices on a Linux system using the GCC compiler. To
represent and store these matrices, I'd like to implement the sparse
matrices as a doubly-linked list, in which each non-zero cell is
stored roughly as follows:
int rownum
int colnum
double cellvalue
cell *rightptr
cell *downptr
I think this implementation makes the most sense because I need to
traverse the matrix both across rows and down columns -- the i-j-th
cell of one matrix is calculated as the matrix-product of the i-th row
by the j-th column of the other matrix.
First, does this sound like the right approach? Any thoughts or other
ideas would be most appreciated.
Second, can anybody point me to some existing code that implements a
sparse matrix as a doubly-linked list? I've Googled sparse matrix and
found dozens of libraries, but I don't know how to evaluate which of
them suits my needs best. Thanks very much,
Adam
I'm a novice C programmer working with a series of large (30,000 x
30,000) sparse matrices on a Linux system using the GCC compiler. To
represent and store these matrices, I'd like to implement the sparse
matrices as a doubly-linked list, in which each non-zero cell is
stored roughly as follows:
int rownum
int colnum
double cellvalue
cell *rightptr
cell *downptr
I think this implementation makes the most sense because I need to
traverse the matrix both across rows and down columns -- the i-j-th
cell of one matrix is calculated as the matrix-product of the i-th row
by the j-th column of the other matrix.
First, does this sound like the right approach? Any thoughts or other
ideas would be most appreciated.
Second, can anybody point me to some existing code that implements a
sparse matrix as a doubly-linked list? I've Googled sparse matrix and
found dozens of libraries, but I don't know how to evaluate which of
them suits my needs best. Thanks very much,
Adam