Goto Chapter: Top 1 2 3 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

1 Basic Meataxe64 DataTypes
 1.1 Defining Categories
 1.2 Constructing and Accessing Meataxe64 Fields and their Elements
 1.3 Constructing and Accessing Meataxe64 Matrices
 1.4 Constructing and Accessing Meataxe64 BitStrings
 1.5 Additional Matrix Functions
 1.6 Additional Bitstring Functions
 1.7 Standard Operations applicable to Meataxe64 objects

1 Basic Meataxe64 DataTypes

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.

1.1 Defining Categories

1.1-1 IsMTX64FiniteField
‣ 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

1.1-2 IsMTX64FiniteFieldElement
‣ 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.

1.1-3 IsMTX64Matrix
‣ 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.

1.1-4 IsMTX64BitString
‣ 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.

1.2 Constructing and Accessing Meataxe64 Fields and their Elements

1.2-1 MTX64_FiniteField
‣ 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.

1.2-2 MTX64_FieldOrder
‣ MTX64_FieldOrder( f )( function )
‣ MTX64_FieldCharacteristic( f )( function )
‣ MTX64_FieldDegree( f )( function )

These functions provide access to basic information about a MeatAxe64 field.

1.2-3 MTX64_FiniteFieldElement
‣ 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.

1.2-4 MTX64_FieldOfElement
‣ MTX64_FieldOfElement( felt )( function )

Returns: the MeatAxe64 finite field in which felt is defined

1.2-5 MTX64_NewMatrix
‣ MTX64_NewMatrix( f, nor, noc )( function )

Returns a new mutable zero matrix over the field f with nor rows and noc columns.

1.3 Constructing and Accessing Meataxe64 Matrices

1.3-1 MTX64_Matrix
‣ 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.

1.3-2 MTX64_RandomMat
‣ 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.

1.3-3 Accessing Matrix Dimensions
‣ 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.

1.3-4 Accessing Matrix Entries Individually
‣ 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.

1.3-5 MTX64_FieldOfMatrix
‣ MTX64_FieldOfMatrix( m )( function )

Returns: the MeatAxe64 finite field over which m is defined

1.3-6 MTX64_InsertVector
‣ 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.

1.3-7 MTX64_ExtractVector
‣ 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.

1.3-8 MTX64_ExtractMatrix
‣ MTX64_ExtractMatrix( m )( operation )

Returns: a GAP matrix (compressed where appropriate) equal to the MeatAxe64 matrix m

1.3-9 MTX64_Submatrix
‣ 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.

1.4 Constructing and Accessing Meataxe64 BitStrings

1.4-1 MTX64_EmptyBitString
‣ MTX64_EmptyBitString( len )( function )

Creates a new bitstring of length len with no set bits

1.4-2 MTX64_GetEntryOfBitstring
‣ MTX64_GetEntryOfBitstring( bitstring, position )( function )

MTX64_GetEntryOfBitstring returns 0 or 1 according to whether the position entry of bitstring bitstring is unset or set.

1.4-3 MTX64_SetEntryOfBitstring
‣ 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.

1.4-4 Converting Meataxe64 BitStrings to and from GAP Boolean Lists
‣ MTX64_BitStringBlist( blist )( function )
‣ MTX64_BlistBitstring( bitstring )( function )

Convert between the MeatAxe64 bitstrings and GAP's Boolean lists

1.4-5 Basic Properties of Meataxe64 BitStrings
‣ 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.

1.4-6 MTX64_PositionsBitString
‣ MTX64_PositionsBitString( bitstring )( function )

Returns a GAP list containing the indices of the set bits of bitstring

1.5 Additional Matrix Functions

1.5-1 MTX64_CompareMatrices
‣ 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.

1.5-2 File I/O for Meataxe64 Matrices
‣ 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

1.5-3 MTX64_HashMatrix
‣ MTX64_HashMatrix( m )( function )

This function implements an efficient hash function for a MeatAxe64 matrix. All entries of the matrix contribute to the hash.

1.6 Additional Bitstring Functions

1.6-1 MTX64_ReadBitString
‣ MTX64_ReadBitString( fn )( function )

Reads a bitstring in from file fn in the Meataxe64 file format, which is defined in the C library documentation

1.6-2 MTX64_CompareBitStrings
‣ 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.

1.6-3 MTX64_RowSelect
‣ 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

1.6-4 MTX64_ColSelect
‣ 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.

1.7 Standard Operations applicable to Meataxe64 objects

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.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 Ind

generated by GAPDoc2HTML