08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1<br />

sage: A = matrix(ZZ,2,3,xrange(6))<br />

sage: type(A)<br />

<br />

sage: B = A.transpose()<br />

sage: print B<br />

[0 3]<br />

[1 4]<br />

[2 5]<br />

sage: print A<br />

[0 1 2]<br />

[3 4 5]<br />

.T is a convenient shortcut for the transpose:<br />

sage: A.T<br />

[0 3]<br />

[1 4]<br />

[2 5]<br />

sage: A.subdivide(None, 1); A<br />

[0|1 2]<br />

[3|4 5]<br />

sage: A.transpose()<br />

[0 3]<br />

[---]<br />

[1 4]<br />

[2 5]<br />

sage.matrix.matrix_integer_dense.tune_multiplication(k, nmin=10, nmax=200, bitmin=2,<br />

bitmax=64)<br />

Compare various multiplication algorithms.<br />

INPUT:<br />

•k - integer; affects numbers <strong>of</strong> trials<br />

•nmin - integer; smallest matrix to use<br />

•nmax - integer; largest matrix to use<br />

•bitmin - integer; smallest bitsize<br />

•bitmax - integer; largest bitsize<br />

OUTPUT:<br />

•prints what doing then who wins - multimodular or classical<br />

EXAMPLES:<br />

sage: from sage.matrix.matrix_integer_dense import tune_multiplication<br />

sage: tune_multiplication(2, nmin=10, nmax=60, bitmin=2,bitmax=8)<br />

10 2 0.2<br />

...<br />

337

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!