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_t * | WgMakeWord (WgData_t *b, long n) |
Calculate a Word. | |
WgData_t * | WgAlloc (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. |
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.
rep | Pointer to the matrix representation. |
int WgFree | ( | WgData_t * | b | ) |
Terminate the word generator.
b | Pointer to word generator data. |
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.
b | Word generator data. | |
fp | Buffer for the finger print (6 numbers). |
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().
b | Pointer to word generator data. | |
n | Word number. |
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.
b | Pointer to word generator data. | |
n | Word number. |