This version of RCWA needs at least GAP 4.4.12, ResClasses 3.0.0, GRAPE 4.3 [Soi06], Polycyclic 2.6 [EN09] and GAPDoc 1.3 [LN11]. 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.
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" );
.
> InfoRCWA | ( info class ) |
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)
.
> RCWATestInstall ( ) | ( function ) |
Returns: Nothing.
Performs a nontrivial computation to check whether an installation of RCWA appears to work. Errors, i.e. differences to the correct results of the test computation, are reported. The processed test file is pkg/rcwa/tst/testinstall.tst
.
> RCWATestAll ( ) | ( function ) |
Returns: Nothing.
Runs the full test suite of the RCWA package. Any differences to the supposed results of the test computations are reported. The processed test file is pkg/rcwa/tst/testall.g
.
Please note that the test suite is a tool for developing. The tests are deliberately very volatile to allow to spot possible problems of any kind also in other packages or in the GAP Library. For this reason you may see reports of differences which simply reflect improved methods in other packages or in the GAP Library (for example an object may already know more of its attributes or properties than it is expected to, or an object may be represented in a better way), or which are caused by changes of the way certain objects are printed, and which are therefore harmless. However if the correct and the actual output look different mathematically or if you see error messages or if GAP crashes, then something went wrong. Also, run times which are much longer than the predicted times shown may indicate a problem.
The following routine is a development tool. As all files it generates are included in the distribution file anyway, users will not need it.
> RCWABuildManual ( ) | ( function ) |
Returns: 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 PDFLaTeX.
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:
> SaveAsBitmapPicture ( picture, filename ) | ( function ) |
Returns: 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 * red + 256 * green + blue in the range 0, dots, 2^24-1 specifying the RGB values of the colors of the pixels.
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"); |
RCWA provides a routine to run demonstrations of its functionality or of other features of GAP. It is intended for being used in talks.
> RunDemonstration ( filename ) | ( function ) |
Returns: Nothing.
This function executes the commands 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.
RCWA provides a routine to convert GAP logfiles to HTML.
> Log2HTML ( logfilename ) | ( function ) |
Returns: Nothing.
This function converts the GAP logfile logfilename to HTML. The extension of the input file must be *.log
. The name of the output file is the same as the one of the input file except that the extension *.log
is replaced by *.html
. There is a sample CSS file in rcwa/doc/gaplog.css
, which you can adjust to your taste.
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^2,...,g^exp]
of powers of g, the function AllProducts(l,k)
returns the list of all products of k entries of the list l, the functions DifferencesList(l)
and QuotientsList(l)
return the list of differences respectively quotients of consecutive entries of the list l, and the function FloatQuotientsList(l)
returns the list of floating point approximations of the latter.
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.
generated by GAPDoc2HTML