You may also find this FAQ of interest.
BTW, if your matrix is sparse, with the majority of elements with the same value, you can optimize things by only transmitting the elements that don't have the default value. For example, for a large matrix containing mostly zeroes, it can be more effective to only send those elements that are non-zero:
Code:
struct MatrixElement {
short row;
short col;
double val;
};
sequence<MatrixElement> Matrix;
Whether this pays off depends on the size of the values in the matrix, and how many of them do not have the default value. (The above adds four bytes of overhead to each non-default element.)
Cheers,
Michi.