A new question: can I use MatSetValues in the following way? MatGetArray(A,&a); a[0]= 1; MatSetValues(A,...); /* in particular, is this allowed inside GetArray/RestoreArray? */ MatRestoreArray(A,&a);
Thanks! Hui On May 14, 2012, at 2:29 PM, Barry Smith wrote: > > If B is 50% dense then store it in a dense format. It will be much faster > and the extra memory is minimal. Even 30% dense. > > Barry > > On May 14, 2012, at 5:13 AM, Hui Zhang wrote: > >> I have two matrices A and B stored in sparse format. While A is really >> sparse, B is relatively >> dense (say non-zeros entries about 50%). Now to multiply the two matrices, >> among >> >> A*B >> or >> (B^T * A^T)^T >> >> which is better, or no big difference ? >> >> Thanks! >> > >
