cristicbz/scid — Issue #61: Transposing Eagerly Copies
Author: dsimcha
Created: 2011-10-28 00:40:58+00:00
State: open

Not sure what the best way to do this within the existing design is, but I need to be able to efficiently transpose a matrix without performing any other operation or doing any copying for some of the linalg stuff I'm working on.

void main() {
import scid.matvec, std.stdio;
auto mat = Matrix!double([[1, 2], [3, 4]]);
auto mat2 = eval(mat.t);
writeln(mat.cdata, '\t', mat2.cdata); // Different addresses
}