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: MS = MatrixSpace(ZZ,4,6)<br />

sage: u = MS.dimension()<br />

sage: u - 24 == 0<br />

True<br />

dims()<br />

Returns (m row, n col) representation <strong>of</strong> self dimension<br />

EXAMPLES:<br />

sage: MS = MatrixSpace(ZZ,4,6)<br />

sage: MS.dims()<br />

(4, 6)<br />

full_category_initialisation()<br />

Make full use <strong>of</strong> the category framework.<br />

NOTE:<br />

It turns out that it causes a massive speed regression in computations with elliptic curves, if a full initialisation<br />

<strong>of</strong> the category framework <strong>of</strong> matrix spaces happens at initialisation: The elliptic curves code<br />

treats matrix spaces as containers, not as objects <strong>of</strong> a category. Therefore, making full use <strong>of</strong> the category<br />

framework is now provided by a separate method (see trac ticket #11900).<br />

EXAMPLES:<br />

sage: MS = MatrixSpace(QQ,8)<br />

sage: TestSuite(MS).run()<br />

Failure in _test_category:<br />

Traceback (most recent call last):<br />

...<br />

AssertionError: category <strong>of</strong> self improperly initialized<br />

------------------------------------------------------------<br />

The following tests failed: _test_category<br />

sage: type(MS)<br />

<br />

sage: MS.full_category_initialisation()<br />

sage: TestSuite(MS).run()<br />

sage: type(MS)<br />

<br />

Todo<br />

Add instead an optional argument to MatrixSpace() to temporarily disable the category initialization<br />

in those special cases where speed is critical:<br />

sage: MS = MatrixSpace(QQ,7, init_category=False) # todo: not implemented<br />

sage: TestSuite(MS).run()<br />

# todo: not implemented<br />

Traceback (most recent call last):<br />

...<br />

AssertionError: category <strong>of</strong> self improperly initialized<br />

until someone recreates explicitly the same matrix space without that optional argument:<br />

sage: MS = MatrixSpace(QQ,7)<br />

sage: TestSuite(MS).run()<br />

# todo: not implemented<br />

# todo: not implemented<br />

gen(n)<br />

Return the n-th generator <strong>of</strong> this matrix space.<br />

6 Chapter 1. Matrix <strong>Spaces</strong>

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

Saved successfully!

Ooh no, something went wrong!