[GAP Forum] Efficient transposition

Stephen Linton sl4 at st-andrews.ac.uk
Sat Oct 24 08:13:12 BST 2015


Dear Anvita,

This looks like a bug at the very least in the sense that a better error message should be produced.
M is constructed here in a compressed form, and I am not sure it is possible to transpose a matrix destructively in that form.

On the other hand, this form is quite space efficient, so making a copy with TransposedMat and then letting the garbage collector get rid of the old copy shouldn’t be too bad. In particular it probably uses less memory that converting the matrix to a different form and then transposing it.

	Steve


> On 24 Oct 2015, at 01:04, Anvita <anvita21 at gmail.com> wrote:
> 
> Dear Forum,
> 
> Is there a way to transpose economically a large rectangular matrix?
> By `economically' I mean without using much additional memory,
> but possibly destroying the original matrix.
> I keep getting an error of the following kind.
> 
> ------------------------------------------------------------------
> gap> M:=NullMat(4,6,GF(5));
> gap> TransposedMatDestructive(M);
> Error, Unbind of entry of locked compressed vector is forbidden in
>  Unbind( mat[j][m + i] ); called from
> <function "unknown">( <arguments> )
> called from read-eval loop at line 62 of *stdin*
> You can `return;' to ignore the assignment
> ------------------------------------------------------------------
> 
> Thank you
> Anvita
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum



More information about the Forum mailing list