Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 2443

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (RCWA) - Chapter 7: Installation and auxiliary functions</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap6.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chapBib.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X859F6BF88754E5CC" name="X859F6BF88754E5CC"></a></p>
<div class="ChapSects"><a href="chap7.html#X859F6BF88754E5CC">7. <span class="Heading">Installation and auxiliary functions</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X85A08CF187A6D986">7.1 <span class="Heading">Requirements</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X8360C04082558A12">7.2 <span class="Heading">Installation</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X7A31FA44791E93C5">7.3 <span class="Heading">The Info class of the package</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X7BAF5F4986288983">7.3-1 InfoRCWA</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap7.html#X8667D5027AC3DE8E">7.4 <span class="Heading">The testing routine</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap7.html#X7A51ED5F839759C0">7.4-1 RCWATest</a></span>
</div>
</div>

<h3>7. <span class="Heading">Installation and auxiliary functions</span></h3>

<p><a id="X85A08CF187A6D986" name="X85A08CF187A6D986"></a></p>

<h4>7.1 <span class="Heading">Requirements</span></h4>

<p>The <strong class="pkg">RCWA</strong> package needs at least <strong class="pkg">GAP</strong> 4.4.7, <strong class="pkg">ResClasses</strong> 2.5.1, <strong class="pkg">GRAPE</strong> 4.0 <a href="chapBib.html#biBGRAPE">[Soi02]</a>, <strong class="pkg">Polycyclic</strong> 2.1 <a href="chapBib.html#biBPolycyclic">[EN06]</a> and <strong class="pkg">GAPDoc</strong> 1.0 <a href="chapBib.html#biBGAPDoc">[LN07]</a>. With possible exception of the most recent version of <strong class="pkg">ResClasses</strong>, all needed packages are already present in an up-to-date standard <strong class="pkg">GAP</strong> installation. The <strong class="pkg">RCWA</strong> package can be used under UNIX, under Windows and on the MacIntosh. It is completely written in the <strong class="pkg">GAP</strong> language and does neither contain nor require external binaries. In particular, warnings concerning missing binaries issued by <strong class="pkg">GRAPE</strong> or other packages can savely be ignored.</p>

<p><a id="X8360C04082558A12" name="X8360C04082558A12"></a></p>

<h4>7.2 <span class="Heading">Installation</span></h4>

<p>Like any other <strong class="pkg">GAP</strong> package, <strong class="pkg">RCWA</strong> must be installed in the <code class="file">pkg</code> subdirectory of the <strong class="pkg">GAP</strong> 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 <code class="code">LoadPackage( "rcwa" );</code>.</p>

<p><a id="X7A31FA44791E93C5" name="X7A31FA44791E93C5"></a></p>

<h4>7.3 <span class="Heading">The Info class of the package</span></h4>

<p><a id="X7BAF5F4986288983" name="X7BAF5F4986288983"></a></p>

<h5>7.3-1 InfoRCWA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; InfoRCWA</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>This is the Info class of the <strong class="pkg">RCWA</strong> package. See section <em>Info Functions</em> in the <strong class="pkg">GAP</strong> Reference Manual for a description of the Info mechanism. For convenience: <code class="code">RCWAInfo(</code><var class="Arg">n</var><code class="code">)</code> is a shorthand for <code class="code">SetInfoLevel(InfoRCWA</code>,<var class="Arg">n</var><code class="code">)</code>.</p>

<p><a id="X8667D5027AC3DE8E" name="X8667D5027AC3DE8E"></a></p>

<h4>7.4 <span class="Heading">The testing routine</span></h4>

<p><a id="X7A51ED5F839759C0" name="X7A51ED5F839759C0"></a></p>

<h5>7.4-1 RCWATest</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RCWATest</code>( <var class="Arg"></var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>Nothing.</p>

<p>Performs tests of the <strong class="pkg">RCWA</strong> package. Errors, i.e. differences to the correct results of the test computations, are reported. The processed test files are in the directory <code class="file">pkg/rcwa/tst</code>.</p>

<p><a id="X854E65D281B80D3B" name="X854E65D281B80D3B"></a></p>

<h4>7.5 <span class="Heading">Building the manual</span></h4>

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

<p><a id="X7AA556D17F61A44C" name="X7AA556D17F61A44C"></a></p>

<h5>7.5-1 RCWABuildManual</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RCWABuildManual</code>( <var class="Arg"></var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>Nothing.</p>

<p>This function builds the manual of the <strong class="pkg">RCWA</strong> package in the file formats LaTeX, PDF, HTML and ASCII text. This is accomplished using the <strong class="pkg">GAPDoc</strong> package by Frank Lübeck and Max Neunhöffer. Building the manual is possible only on UNIX systems and requires PDFLaTeX.</p>

<p><a id="X7C7AB20486E56B83" name="X7C7AB20486E56B83"></a></p>

<h4>7.6 <span class="Heading">Loading and saving bitmap pictures</span></h4>

<p><strong class="pkg">RCWA</strong> 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:</p>

<p><a id="X81DE1E838615C214" name="X81DE1E838615C214"></a></p>

<h5>7.6-1 SaveAsBitmapPicture</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; SaveAsBitmapPicture</code>( <var class="Arg">picture, filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>Nothing.</p>

<p>Writes the pixel matrix <var class="Arg">picture</var> to a bitmap- (bmp-) picture file named <var class="Arg">filename</var>. The filename should include the entire pathname. The argument <var class="Arg">picture</var> 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 <var class="Arg">picture</var> 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.</p>

<p>The picture can be read back into <strong class="pkg">GAP</strong> by the function <code class="code">ReadFromBitmapPicture(<var class="Arg">filename</var>)</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; color   := n-&gt;32*(n mod 8)+256*32*(Int(n/8) mod 8)+65536*32*Int(n/64);;
gap&gt; picture := List([1..512],y-&gt;List([1..512],x-&gt;color(Gcd(x,y)-1)));;
gap&gt; SaveAsBitmapPicture(picture,"~/images/gcd.bmp");

</pre></td></tr></table>

<p><a id="X85E215DB85F610ED" name="X85E215DB85F610ED"></a></p>

<h4>7.7 <span class="Heading">Running demonstrations</span></h4>

<p><strong class="pkg">RCWA</strong> provides a routine to run demonstrations of its functionality or of other features of <strong class="pkg">GAP</strong>. It is intended for being used in talks.</p>

<p><a id="X850524E47E3DB78D" name="X850524E47E3DB78D"></a></p>

<h5>7.7-1 RunDemonstration</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RunDemonstration</code>( <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>Nothing.</p>

<p>This function executes the code in the file named <var class="Arg">filename</var>. 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 <code class="code">q</code>. The function is adapted from the function <code class="code">Demonstration</code> in the file <code class="file">lib/demo.g</code> of the main <strong class="pkg">GAP</strong> distribution.</p>

<p><a id="X8677C67F7AD4C9C7" name="X8677C67F7AD4C9C7"></a></p>

<h4>7.8 <span class="Heading">Some general utility functions</span></h4>

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

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


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap6.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chapBib.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>