Hi. I have a strange problem that is causing a segfault, and I have a theory about the cause. Hopefully someone on this list can confirm/disprove this theory.
I have a matrix A, and a view V on a submatrix of A. I then swap two columns of A. Later, I copy another submatrix B into V (and, in turn, changing values in A). Is V a view on the same column indices of A as before? Is it possible that copying B into V after the swap in A is causing some kind of memory problem? To give you an idea of the kind of thing I am talking about, consider the following code (where X is a previously defined 3x3 matrix): gsl_matrix * A = gsl_matrix_alloc(3,5); gsl_matrix_view V = gsl_matrix_submatrix(A,0,0,3,3); gsl_matrix_swap_columns(A, 1, 4); gsl_matrix_memcpy(&V.matrix, X); Thanks for your help. Michael Michael Braun Assistant Professor of Marketing MIT Sloan School of Management One Amherst St., E40-169 Cambridge, MA 02142 (617) 253-3436 [EMAIL PROTECTED] _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
