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

matrix_<strong>of</strong>_variables()<br />

This method provides some backward compatibility for Cayley tables <strong>of</strong> groups, whose output was restricted<br />

to this single format.<br />

EXAMPLES:<br />

The output here is from the doctests for the old cayley_table() method for permutation groups.<br />

sage: from sage.matrix.operation_table import OperationTable<br />

sage: G=PermutationGroup([’(1,2,3)’, ’(2,3)’])<br />

sage: T=OperationTable(G, operator.mul)<br />

sage: T.matrix_<strong>of</strong>_variables()<br />

[x0 x1 x2 x3 x4 x5]<br />

[x1 x0 x3 x2 x5 x4]<br />

[x2 x4 x0 x5 x1 x3]<br />

[x3 x5 x1 x4 x0 x2]<br />

[x4 x2 x5 x0 x3 x1]<br />

[x5 x3 x4 x1 x2 x0]<br />

sage: T.column_keys()[3]*T.column_keys()[3] == T.column_keys()[4]<br />

True<br />

row_keys()<br />

Returns a tuple <strong>of</strong> the elements used to build the table.<br />

Note: column_keys <strong>and</strong> row_keys are identical. Both list the elements in the order used to label the<br />

table.<br />

OUTPUT:<br />

The elements <strong>of</strong> the algebraic structure used to build the table, as a list. But most importantly, elements<br />

are present in the list in the order which they appear in the table’s column headings.<br />

EXAMPLES:<br />

sage: from sage.matrix.operation_table import OperationTable<br />

sage: G=AlternatingGroup(3)<br />

sage: T=OperationTable(G, operator.mul)<br />

sage: T.column_keys()<br />

((), (1,2,3), (1,3,2))<br />

set_print_symbols(ascii, latex)<br />

Set the symbols used for text <strong>and</strong> LaTeX printing <strong>of</strong> operation tables.<br />

INPUT:<br />

•ascii - a single character for text table<br />

•latex - a string to represent an operation in LaTeX math mode. Note the need for double-backslashes<br />

to escape properly.<br />

EXAMPLE:<br />

sage: from sage.matrix.operation_table import OperationTable<br />

sage: G=AlternatingGroup(3)<br />

sage: T=OperationTable(G, operator.mul)<br />

sage: T.set_print_symbols(’@’, ’\\times’)<br />

sage: T<br />

@ a b c<br />

+------<br />

a| a b c<br />

b| b c a<br />

410 Chapter 23. Operation Tables

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

Saved successfully!

Ooh no, something went wrong!