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 />

INPUT:<br />

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

•min - minimal value for entries <strong>of</strong> matrix (default: -9)<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.inverse_QQ(100)<br />

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

# optional - magma<br />

sage.matrix.benchmark.invert_hilbert_QQ(n=40, system=’sage’)<br />

Runs the benchmark for calculating the inverse <strong>of</strong> the hilbert matrix over rationals <strong>of</strong> dimension n.<br />

INPUT:<br />

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

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

EXAMPLES:<br />

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

sage: ts = b.invert_hilbert_QQ(30)<br />

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

# optional - magma<br />

sage.matrix.benchmark.matrix_add_GF(n=1000, p=16411, system=’sage’, times=100)<br />

Given two n x n matrix over GF(p) with r<strong>and</strong>om entries, add them.<br />

INPUT:<br />

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

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

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

•times - number <strong>of</strong> experiments (default: 100)<br />

EXAMPLES:<br />

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

sage: ts = b.matrix_add_GF(500, p=19)<br />

sage: tm = b.matrix_add_GF(500, p=19, system=’magma’)<br />

# optional - magma<br />

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

Matrix addition over ZZ Given an n x n matrix A <strong>and</strong> B over ZZ with r<strong>and</strong>om entries between min <strong>and</strong> max,<br />

inclusive, compute A + B times times.<br />

INPUT:<br />

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

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

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

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

•times - number <strong>of</strong> experiments (default: 50)<br />

EXAMPLES:<br />

416 Chapter 24. Benchmarks for matrices

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

Saved successfully!

Ooh no, something went wrong!