On Thursday 14 July 2011, Simon King wrote: > Hi Martin, > > On 14 Jul., 13:26, Martin Albrecht <martinralbre...@googlemail.com> > > wrote: > > Note that these operations are quadratic just as the conversion Sage => > > LinBox. > > I am a bit surprised. My impression from reading > sage.matrix.matrix_modn_dense was that Sage stores the matrix data in > LinBox format anyway. So, did I get the wrong impression?
Hi, linbox.matrix_matrix_multiply calls linbox_modn_dense_matrix_matrix_multiply from the LinBox SPKG (src/interfaces/sage/linbox.C) which calls static DenseMatrix<ModInt> linbox_new_modn_matrix(mod_int modulus, mod_int** matrix, size_t nrows, si\ ze_t ncols) { ModInt F((double)modulus); DenseMatrix<ModInt> A ( F, nrows, ncols); size_t i, j, k; for (i=0; i < nrows; i++) { for (j=0; j < ncols; j++) { A.setEntry(i, j, (double)matrix[i][j]); } } return A; }; which copies the matrix to a new matrix A. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org