The Word Generator


Detailed Description

Given a finitely generated matrix algebra A, the word generator produces "random" elements of A, i.e., words in the generators. Words are numbered starting with 1. Here is an example demonstrating the usage of the word generator:
 MatRep_t *rep;
 ...
 WgData_t *wg = WgAlloc(rep);
 Matrix_t *word = WgMakeWord(wg,1833);
 long nul = MatNullity__(word);
 printf("Word 1833 has nullity %ld\n",nul);
 WgFree(wg);

Data Structures

class  WgData_t
 Word Generator Data. More...

Functions

const char * WgSymbolicName (const WgData_t *b, long n)
 Symbolic name of a word.
Matrix_tWgMakeWord (WgData_t *b, long n)
 Calculate a Word.
WgData_tWgAlloc (const MatRep_t *rep)
 Initialize the word generator.
int WgFree (WgData_t *b)
 Terminate the word generator.
void WgMakeFingerPrint (WgData_t *b, int fp[6])
 Calculate finger print.

Function Documentation

WgData_t* WgAlloc ( const MatRep_t rep  ) 

Initialize the word generator.

This function initializes the word generator for a given matrix representation rep. There must be at least one generator. On success, WgAlloc() returns a pointer to an internal data structure which can be used in subsequent calls to WgMakeWord() and WgFree(). If an error occurs, the return value is 0.

Note that the word generator does not create internal copies of the generators. The caller must assure that the generators, are not deleted or modified as long as the word generator is in use.

Parameters:
rep Pointer to the matrix representation.
Returns:
Pointer to a new word generator data structure or 0 on error.

int WgFree ( WgData_t b  ) 

Terminate the word generator.

Parameters:
b Pointer to word generator data.
Returns:
0 on success, -1 on error. This function terminates the word generator and cleans up internal data structures. Note that the generators that were passed to WgInit() are not freed.

void WgMakeFingerPrint ( WgData_t b,
int  fp[6] 
)

Calculate finger print.

This function calculates the "finger print" of a module, i.e. the nullities of the first 6 words.

Parameters:
b Word generator data.
fp Buffer for the finger print (6 numbers).

Matrix_t* WgMakeWord ( WgData_t b,
long  n 
)

Calculate a Word.

This function calculates an element in a matrix algebra, given its number. Generators for the algebra are specified when the WgData_t structure is allocated with WgAlloc().

Parameters:
b Pointer to word generator data.
n Word number.
Returns:
Matrix representation of the word or 0 on error.

const char* WgSymbolicName ( const WgData_t b,
long  n 
)

Symbolic name of a word.

This function returns a symbolic representation of the word n as a polynomial in the generators. The generators are named a, b, c... The return value is a pointer to a static buffer which is overwritten on each call.

Parameters:
b Pointer to word generator data.
n Word number.
Returns:
Symbolic name of the word.


MeatAxe 2.4 documentation, generated on Tue May 12 01:29:55 2009