The Meataxe64 system has its own representations of finite fields, their elements, and matrices over them, as well as a bitstring used to indicate a selection of rows or columns from a matrix. Note that there is no vector type, a vector is simply a matrix with one row. Note further that working with such vectors is relatively inefficient, and should be avoided where possible.
The Meataxe64 GAP package provides GAP objects which "wrap" these Meataxe64 objects, which are defined in this chapter.
‣ IsMTX64FiniteField ( arg ) | ( filter ) |
Returns: true
or false
The category of MeatAxe64 finite fields. There is one such field for every prime power up to 2^64 inclusive. There should be only one GAP object, up to identity, which represents a field of any given order. They are unrelated to other finite field objects in GAP and are not fields (or even collections) in the GAP sense
‣ IsMTX64FiniteFieldElement ( arg ) | ( filter ) |
Returns: true
or false
The category of MeatAxe64 finite field elements. They are not equal to other finite field elements in GAP and there is no automatic inclusion of subfields.
‣ IsMTX64Matrix ( arg ) | ( filter ) |
Returns: true
or false
The category of MeatAxe64 matrices. They are not matrices in the GAP sense (not even matrix objects) and are not lists of lists. MeatAxe64 matrices know their dimensions and defining field.
‣ IsMTX64BitString ( arg ) | ( filter ) |
Returns: true
or false
The category of MeatAxe64 bitstrings. Used heavily in Gaussian elimination to indicate locations of pivot rows and columns.
‣ MTX64_FiniteField ( q ) | ( operation ) |
‣ MTX64_FiniteField ( p, d ) | ( operation ) |
Returns: a MeatAxe64 finite field of order q
retrieves a MeatAxe64 finite field of given order, which must be be a prime power less than or equal to 2^64, creating it if needed. If the order is not a prime power an error is generated.
‣ MTX64_FieldOrder ( f ) | ( function ) |
‣ MTX64_FieldCharacteristic ( f ) | ( function ) |
‣ MTX64_FieldDegree ( f ) | ( function ) |
These functions provide access to basic information about a MeatAxe64 field.
‣ MTX64_FiniteFieldElement ( f, x ) | ( operation ) |
‣ MTX64_FiniteFieldElement ( fld, ffe ) | ( operation ) |
creates a MeatAxe64 finite field element in a given field f. The element may be specified by number: the numbering of elements runs from 0 to q-1 and is defined in the MeatAxe64 C library. It is guaranteed that element 0 is the zero of the field and element 1 is the one of the field. Alternatively the element may be specified by giving the corresponding GAP finite field element.
‣ MTX64_FieldOfElement ( felt ) | ( function ) |
Returns: the MeatAxe64 finite field in which felt is defined
‣ MTX64_NewMatrix ( f, nor, noc ) | ( function ) |
Returns a new mutable zero matrix over the field f with nor rows and noc columns.
‣ MTX64_Matrix ( m ) | ( operation ) |
‣ MTX64_Matrix ( m, fld ) | ( operation ) |
‣ MTX64_Matrix ( m, q ) | ( operation ) |
‣ MTX64_Matrix ( m, q, nor, noc ) | ( operation ) |
constructs a Meataxe64 matrix from a GAP matrix, plus optional specification of the field and dimensions of the matrix. Specification of the dimensions is useful in the case where the number of rows is zero.
‣ MTX64_RandomMat ( f, n, m ) | ( function ) |
Constructs a new Meataxe64 matrix with n rows and m columns over the field f.The entries are uniformly pseudo-randomly chosen from f using the GlobalMersenneTwister
(Reference: GlobalMersenneTwister) random source. This function is significantly more efficient that filling in random entries individually, or using RandomMat
(Reference: RandomMat) and then converting the result.
‣ MTX64_NumCols ( m ) | ( function ) |
‣ MTX64_NumRows ( m ) | ( function ) |
These function return the dimensions of the matrix. Unlike in the C API every matrix knows how many rows it has. Unlike in GAP even a matrix with no rows knows how many columns it has.
‣ MTX64_GetEntry ( m, i, j ) | ( function ) |
‣ MTX64_SetEntry ( m, i, j, x ) | ( function ) |
MTX64_GetEntry
and MTX64_SetEntry
provide access to individual entries of matrices. i and j are zero based row and column indices respectively and x is Meataxe64 finite field element defined over the same field as m.
‣ MTX64_FieldOfMatrix ( m ) | ( function ) |
Returns: the MeatAxe64 finite field over which m is defined
‣ MTX64_InsertVector ( m, v, row ) | ( function ) |
Copies the GAP vector v as row row of the mutable Meataxe64 matrix m. Row numbering is zero-based. An error will be given if the vector and matrix are not compatible. For GAP's built-in comrpessed vectors over small fields this will be much more efficient than inserting the entries one by one.
‣ MTX64_ExtractVector ( m, row ) | ( function ) |
Returns a GAP vector equal to row row (zero-based) of the Meataxe64 matrix m. When the field of m is small enough, the vector will be compressed.
‣ MTX64_ExtractMatrix ( m ) | ( operation ) |
Returns: a GAP matrix (compressed where appropriate) equal to the MeatAxe64 matrix m
‣ MTX64_Submatrix ( m, startrow, numrows, startcol, numcols ) | ( function ) |
returns a copy of the submatrix of m specified by the indices. startrow and startcol are one based.
‣ MTX64_EmptyBitString ( len ) | ( function ) |
Creates a new bitstring of length len with no set bits
‣ MTX64_GetEntryOfBitstring ( bitstring, position ) | ( function ) |
MTX64_GetEntryOfBitstring
returns 0 or 1 according to whether the position entry of bitstring bitstring is unset or set.
‣ MTX64_SetEntryOfBitstring ( bitstring, position ) | ( function ) |
MTX64_SetEntryOfBitstring
sets the position entry of bitstring bitstring (to 1). There is no way to set an entry to zero in the underlying Meataxe64 C library.
‣ MTX64_BitStringBlist ( blist ) | ( function ) |
‣ MTX64_BlistBitstring ( bitstring ) | ( function ) |
Convert between the MeatAxe64 bitstrings and GAP's Boolean lists
‣ MTX64_LengthOfBitString ( bitstring ) | ( function ) |
‣ MTX64_WeightOfBitstring ( bitstring ) | ( function ) |
The length of a bitstring is the number of bits in it, the weight is the number of one bits. The weight is stored in the BitString.
‣ MTX64_PositionsBitString ( bitstring ) | ( function ) |
Returns a GAP list containing the indices of the set bits of bitstring
‣ MTX64_CompareMatrices ( m1, m2 ) | ( function ) |
This function underlies the comparison of matrices used by <
and =
. For compatible matrices m1 and m2 it returns a negative, zero or positive integer according to whether m1 is less than, equal to, or greater than m2.
‣ MTX64_ReadMatrix ( fn ) | ( function ) |
‣ MTX64_WriteMatrix ( m, fn ) | ( function ) |
These functions allow reading and writing of matrices to disk in the Meataxe64 file format, which is defined in the C library documentation
‣ MTX64_HashMatrix ( m ) | ( function ) |
This function implements an efficient hash function for a MeatAxe64 matrix. All entries of the matrix contribute to the hash.
‣ MTX64_ReadBitString ( fn ) | ( function ) |
Reads a bitstring in from file fn in the Meataxe64 file format, which is defined in the C library documentation
‣ MTX64_CompareBitStrings ( b1, b2 ) | ( function ) |
This function underlies the comparison of bitstrings used by <
and =
. For bitstrings b1 and b2 it returns a negative, zero or positive integer according to whether b1 is less than, equal to, or greater than b2.
‣ MTX64_RowSelect ( bs, m ) | ( function ) |
Returns: a new, immutable, plain, length 2 list. The first entry is a new Meataxe64 matrix containing only those rows of m whose corresponding entry in bs is set. The second entry is a new Meataxe64 matrix containing the remaining rows.The length of bs must match the number of rows of m
‣ MTX64_ColSelect ( bitstring, matrix ) | ( function ) |
MTX64_ColSelect
returns a new immutable plain list containing two matrices. The first is composed of the columns of matrix corresponding to the set bits in bitstring whose length should match the number columns of matrix. The second is composed of the remaining columns.
Methods are installed for many standard operations applied to Meataxe64 objects. In this section we briefly list the more important ones with some notes where the behaviour may not be as expected.
<
(Reference: \<) for Meataxe64 fields orders fields by their size. For Meataxe64 finite field elements, it orders them according to the internal numbering used by the C meataxe.
Standard arithmetic operations such as Zero
(Reference: Zero) and *
(Reference: *) are installed for Meataxe64 finite field elements, and where relevant for the fields.
A limited set of collection operations such as Size
(Reference: Size), AsList
(Reference: AsList), AsSSortedList
(Reference: AsSSortedList) and Random
(Reference: Random) are provided for Meataxe64 finite fields, for convenience, although such fields are not properly collections.
The list access operation \[\]
can be used to do the same thing as MTX64_ExtractVector
(1.3-7), except that in this case the row indexing is one based.
The list assignment operation \[\]\:\=
can be used to do the same thing as MTX64_InsertVector
(1.3-6), except that in this case the row indexing is one based.
ShallowCopy
(Reference: ShallowCopy) applied to a Meataxe64 matrix produces a new matrix which does not share its rows with the original, unlike standard GAP matrices.
Arithmetic operations are installed for operations among Meataxe64 matrices and between matrices and finite field elements. There is no automatic coercion between fields, and matrix dimensions must match correctly (unbound entries are not treated as zero). This includes transposition.
MatElm
and SetMatElm
methods are installed for matrices which do the same as MTX64_GetEntry
(1.3-4) and MTX64_SetEntry
(1.3-4) but using one-based indexing. This supports access like m[i,j]
for reading and writing.
Meataxe64 matrices are only equal or comparable with <
(Reference: \<) if they are defined over the same field and of the same shape. The ordering is a linear ordering, but is not otherwise defined.
List access via \[\]
and \[\]\:\=
is supported for bit strings, with the bits returned as the integers 0 and 1. Note however that bits can only be set to 1, not to 0. Indices in this case are one-based.
generated by GAPDoc2HTML