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.matrix.benchmark.report_GF(p=16411, **kwds)<br />

Runs all the reports for finite field matrix operations, for prime p=16411.<br />

INPUT:<br />

•p - ignored<br />

•**kwds - passed through to report()<br />

Note: right now, even though p is an input, it is being ignored! If you need to check the performance for other<br />

primes, you can call individual benchmark functions.<br />

EXAMPLES:<br />

sage: import sage.matrix.benchmark as b<br />

sage: print "starting"; import sys; sys.stdout.flush(); b.report_GF(systems=[’sage’])<br />

starting...<br />

======================================================================<br />

Dense benchmarks over GF with prime 16411<br />

======================================================================<br />

...<br />

======================================================================<br />

sage.matrix.benchmark.report_ZZ(**kwds)<br />

Reports all the benchmarks for integer matrices <strong>and</strong> few rational matrices.<br />

INPUT:<br />

•**kwds - passed through to report()<br />

EXAMPLES:<br />

sage: import sage.matrix.benchmark as b<br />

sage: print "starting"; import sys; sys.stdout.flush(); b.report_ZZ(systems=[’sage’])<br />

starting...<br />

======================================================================<br />

Dense benchmarks over ZZ<br />

======================================================================<br />

...<br />

======================================================================<br />

# long ti<br />

sage.matrix.benchmark.smithform_ZZ(n=128, min=0, max=9, system=’sage’)<br />

Smith Form over ZZ: Given a n x n matrix over ZZ with r<strong>and</strong>om entries between min <strong>and</strong> max, compute the<br />

Smith normal form.<br />

INPUT:<br />

•n - matrix dimension (default: 128)<br />

•min - minimal value for entries <strong>of</strong> matrix (default: 0)<br />

•max - maximal value for entries <strong>of</strong> matrix (default: 9)<br />

•system - either ‘sage’ or ‘magma’ (default: ‘sage’)<br />

EXAMPLES:<br />

sage: import sage.matrix.benchmark as b<br />

sage: ts = b.smithform_ZZ(100)<br />

sage: tm = b.smithform_ZZ(100, system=’magma’)<br />

# optional - magma<br />

sage.matrix.benchmark.vecmat_ZZ(n=300, min=-9, max=9, system=’sage’, times=200)<br />

Vector matrix multiplication over ZZ.<br />

421

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

Saved successfully!

Ooh no, something went wrong!