Installation and auxiliary functions
Requirements

The &RCWA; package needs at least &GAP; 4.4.7, &ResClasses; 2.5.1, `GRAPE` 4.0 , `Polycyclic` 2.1 and &GAPDoc; 1.0 . With possible exception of the most recent version of &ResClasses;, all needed packages are already present in an up-to-date standard &GAP; installation. The &RCWA; package can be used under UNIX, under Windows and on the MacIntosh. It is completely written in the &GAP; language and does neither contain nor require external binaries. In particular, warnings concerning missing binaries issued by `GRAPE` or other packages can savely be ignored.

Installation

Like any other &GAP; package, &RCWA; must be installed in the pkg subdirectory of the &GAP; distribution. This is accomplished by extracting the distribution file in this directory. If you have done this, you can load the package as usual via LoadPackage( "rcwa" );.

The Info class of the package
This is the Info class of the `RCWA` package. See section Info Functions in the &GAP; Reference Manual for a description of the Info mechanism. For convenience: RCWAInfo(n) is a shorthand for SetInfoLevel(InfoRCWA,n). RCWAInfo
The testing routine
Nothing.
Performs tests of the &RCWA; package. Errors, i.e. differences to the correct results of the test computations, are reported. The processed test files are in the directory pkg/rcwa/tst.
Building the manual

The following routine is a development tool. As all files it generates are included in the distribution file anyway, users will not need it.

Nothing.
This function builds the manual of the &RCWA; package in the file formats &LaTeX;, PDF, HTML and ASCII text. This is accomplished using the &GAPDoc; package by Frank Lübeck and Max Neunhöffer. Building the manual is possible only on UNIX systems and requires PDF&LaTeX;.
Loading and saving bitmap pictures

&RCWA; provides functions to create bitmap picture files from suitable pixel matrices and vice versa. The author has successfully tested this feature both under Linux and under Windows, and the produced pictures can be processed further with many common graphics programs:

Nothing.
Writes the pixel matrix picture to a bitmap- (bmp-) picture file named filename. The filename should include the entire pathname.

The argument picture can be a GF(2) matrix, in which case a monochrome picture file is generated. In this case, zeros stand for black pixels and ones stand for white pixels.

The argument picture can also be an integer matrix, in which case a 24-bit True Color picture file is generated. In this case, the entries of the matrix are supposed to be integers n = 65536 \cdot red + 256 \cdot green + blue in the range 0, \dots, 2^{24}-1 specifying the RGB values of the colors of the pixels.

ReadFromBitmapPicture

The picture can be read back into &GAP; by the function ReadFromBitmapPicture(filename). gap> color := n->32*(n mod 8)+256*32*(Int(n/8) mod 8)+65536*32*Int(n/64);; gap> picture := List([1..512],y->List([1..512],x->color(Gcd(x,y)-1)));; gap> SaveAsBitmapPicture(picture,"~/images/gcd.bmp");
Running demonstrations

&RCWA; provides a routine to run demonstrations of its functionality or of other features of &GAP;. It is intended for being used in talks.

Nothing.
This function executes the code in the file named filename. It shows a command and the corresponding output, waits for a keystroke, shows the next command and the corresponding output, waits again for a keystroke, and so on until the end of the file. The demonstration can be stopped by pressing q. The function is adapted from the function Demonstration in the file lib/demo.g of the main &GAP; distribution.
Some general utility functions
GeneratorsAndInverses
EpimorphismByGenerators
ListOfPowers
AllProducts
DifferencesList
FloatQuotients
EquivalenceClasses
EquivalenceClasses

&RCWA; introduces a couple of small utility functions which can be used in a more general context: The function GeneratorsAndInverses(G) returns a list of generators of G and their inverses, EpimorphismByGenerators(G,H) is a shorthand for GroupHomomorphismByImages(G,H, GeneratorsOfGroup(G),GeneratorsOfGroup(H)) (there is also an NC version of this), the function ListOfPowers(g,exp) returns the list [g,g&circum;2,...,g&circum;exp] of powers of g, the function AllProducts(l,k) returns the list of all products of k entries of the list l, the function DifferencesList(l) returns the list of differences of consecutive entries of the list l, and the function FloatQuotients(l) returns the list of floating point approximations of quotients of consecutive entries of the list l.

There are also methods EquivalenceClasses(l,inv) and EquivalenceClasses(l,rel), which decompose a list l into equivalence classes under an equivalence relation. The equivalence relation is given either as a function inv computing a class invariant of a given list entry or as a function rel which takes as arguments two list entries and returns either true or false depending on whether the arguments belong to the same equivalence class or not.