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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<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: import sage.matrix.benchmark as b<br />

sage: ts = b.rank2_ZZ(300)<br />

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

# optional - magma<br />

sage.matrix.benchmark.rank_GF(n=500, p=16411, system=’sage’)<br />

Rank over GF(p): Given a n x (n+10) matrix over GF(p) with r<strong>and</strong>om entries, compute the rank.<br />

INPUT:<br />

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

•p - prime number (default: 16411)<br />

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

EXAMPLES:<br />

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

sage: ts = b.rank_GF(1000)<br />

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

# optional - magma<br />

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

Rank over ZZ: Given a n x (n+10) matrix over ZZ with r<strong>and</strong>om entries between min <strong>and</strong> max, compute the rank.<br />

INPUT:<br />

•n - matrix dimension (default: 700)<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.rank_ZZ(300)<br />

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

# optional - magma<br />

sage.matrix.benchmark.report(F, title, systems=[’sage’, ‘magma’], **kwds)<br />

Run benchmarks with default arguments for each function in the list F.<br />

INPUT:<br />

•F - a list <strong>of</strong> callables used for benchmarking<br />

•title - a string describing this report<br />

•systems - a list <strong>of</strong> systems (supported entries are ‘sage’ <strong>and</strong> ‘magma’)<br />

•**kwds - keyword arguments passed to all functions in F<br />

EXAMPLES:<br />

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

sage: print "starting"; import sys; sys.stdout.flush(); b.report([b.det_ZZ], ’Test’, systems=[’s<br />

starting...<br />

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

Test<br />

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

...<br />

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

420 Chapter 24. Benchmarks for matrices

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

Saved successfully!

Ooh no, something went wrong!