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

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

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

# optional - magma<br />

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

Characteristic polynomial over ZZ: Given a n x n matrix over ZZ with r<strong>and</strong>om entries between min <strong>and</strong> max,<br />

compute the charpoly.<br />

INPUT:<br />

•n - matrix dimension (default: 100)<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.charpoly_ZZ(100)<br />

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

# optional - magma<br />

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

Dense determinant over GF(p). Given an n x n matrix A over GF with r<strong>and</strong>om entries compute det(A).<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.det_GF(1000)<br />

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

# optional - magma<br />

sage.matrix.benchmark.det_QQ(n=300, num_bound=10, den_bound=10, system=’sage’)<br />

Dense rational determinant over QQ. Given an n x n matrix A over QQ with r<strong>and</strong>om entries with numerator<br />

bound <strong>and</strong> denominator bound, compute det(A).<br />

INPUT:<br />

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

•num_bound - numerator bound, inclusive (default: 10)<br />

•den_bound - denominator bound, inclusive (default: 10)<br />

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

EXAMPLES:<br />

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

sage: ts = b.det_QQ(200)<br />

sage: ts = b.det_QQ(10, num_bound=100000, den_bound=10000)<br />

sage: tm = b.det_QQ(200, system=’magma’) # optional - magma<br />

sage.matrix.benchmark.det_ZZ(n=200, min=1, max=100, system=’sage’)<br />

Dense integer determinant over ZZ. Given an n x n matrix A over ZZ with r<strong>and</strong>om entries between min <strong>and</strong><br />

max, inclusive, compute det(A).<br />

414 Chapter 24. Benchmarks for matrices

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

Saved successfully!

Ooh no, something went wrong!