<h3>2 <span class="Heading">Bits and Pieces</span></h3>
<p>This chapter contains a few very basic functions which are needed for space group calculations and were missing in standard <strong class="pkg">GAP</strong>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SignRat</code>( <var class="Arg">x</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: sign of the rational number <var class="Arg">x</var> (Standard <strong class="pkg">GAP</strong> currently only has <code class="code">SignInt</code>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ VectorModOne</code>( <var class="Arg">v</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: Rational vector of the same length with enties in <span class="SimpleMath">[0,1)</span></p>
<p>For a rational vector <var class="Arg">v</var>, this returns the vector with all entries taken "mod 1".</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DimensionSquareMat</code>( <var class="Arg">matrix</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: Number of lines in the matrix <var class="Arg">matrix</var> if it is square and <code class="keyw">fail</code> otherwise</p>
<p>Affine mappings of <span class="SimpleMath">n</span> dimensional space are often written as a pair <span class="SimpleMath">(A,v)</span> where <span class="SimpleMath">A</span> is a linear mapping and <span class="SimpleMath">v</span> is a vector. <strong class="pkg">GAP</strong> represents affine mappings by <span class="SimpleMath">n+1</span> times <span class="SimpleMath">n+1</span> matrices <span class="SimpleMath">M</span> which satisfy <span class="SimpleMath">M_{n+1,n+1}=1</span> and <span class="SimpleMath">M_{i,n+1}=0</span> for all <span class="SimpleMath">1≤ i ≤ n</span>.</p>
<p>An affine matrix acts on an <span class="SimpleMath">n</span> dimensional space which is written as a space of <span class="SimpleMath">n+1</span> tuples with <span class="SimpleMath">n+1</span>st entry <span class="SimpleMath">1</span>. Here we give two functions to handle these affine matrices.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LinearPartOfAffineMatOnRight</code>( <var class="Arg">mat</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: the linear part of the affine matrix <var class="Arg">mat</var>. That is, everything except for the last row and column.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BasisChangeAffineMatOnRight</code>( <var class="Arg">transform</var>, <var class="Arg">mat</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: affine matrix with same dimensions as <var class="Arg">mat</var></p>
<p>A basis change <var class="Arg">transform</var> of an <span class="SimpleMath">n</span> dimensional space induces a transformation on affine mappings on this space. If <var class="Arg">mat</var> is a affine matrix (in particular, it is <span class="SimpleMath">(n+1)× (n+1)</span>), this method returns the image of <var class="Arg">mat</var> under the basis transformation induced by <var class="Arg">transform</var>.</p>
<p>Given a vector <var class="Arg">v</var> with <span class="SimpleMath">n</span> entries, this method returns a <span class="SimpleMath">(n+1)× (n+1)</span> matrix which corresponds to the affine translation defined by <var class="Arg">v</var>.</p>
<p>For a finite matrix group <var class="Arg">G</var>, the gramian matrix of the average scalar product is returned. This is the sum over all <span class="SimpleMath">gg^t</span> with <span class="SimpleMath">g∈ G</span> (actually it is enough to take a generating set). The group <var class="Arg">G</var> is orthogonal with respect to the scalar product induced by the returned matrix.</p>
<p>Inequalities are represented in the same way they are represented in <strong class="pkg">polymaking</strong>. The vector <span class="SimpleMath">(v_0,...,v_n)</span> represents the inequality <span class="SimpleMath">0≤ v_0+v_1 x_1+... + v_n x_n</span>.</p>
<p>Calculates the inequality defining the half-space containing <var class="Arg">v1</var> such that <code class="code"><var class="Arg">v1</var>-<var class="Arg">v2</var></code> is perpendicular on the bounding hyperplane. And <code class="code">(<var class="Arg">v1</var>-<var class="Arg">v2</var>)/2</code> is contained in the bounding hyperplane.<br /> If the matrix <var class="Arg">gram</var> is given, it is used as the gramian matrix. Otherwiese, the standard scalar product is used. It is not checked if <var class="Arg">gram</var> is positive definite or symmetric.</p>
<p>Let <var class="Arg">v</var> be a vector of length <span class="SimpleMath">n</span> and <var class="Arg">ineq</var> an inequality represented by a vector of length <span class="SimpleMath">n+1</span>. Then <code class="code">WhichSideOfHyperplane(<var class="Arg">v, ineq</var>)</code> returns 1 if <var class="Arg">v</var> is a solution of the inequality but not the equation given by <var class="Arg">ineq</var>, it returns 0 if <var class="Arg">v</var> is a solution to the equation and -1 if it is not a solution of the inequality <var class="Arg">ineq</var>.</p>
<p>The NC version does not test the input for correctness.</p>
<p>Let <var class="Arg">poly</var> be a <code class="keyw">PolymakeObject</code> and <var class="Arg">point</var> a vector. If <var class="Arg">point</var> is a vertex of <var class="Arg">poly</var>, the string <code class="code">"VERTEX"</code> is returned. If <var class="Arg">point</var> lies inside <var class="Arg">poly</var>, <code class="code">"INSIDE"</code> is returned and if it lies in a facet, <code class="code">"FACET"</code> is returned and if <var class="Arg">point</var> does not lie inside <var class="Arg">poly</var>, the function returns <code class="code">"OUTSIDE"</code>.</p>
<p>Given an <code class="keyw">AffineCrystGroupOnLeftOrRight</code> <var class="Arg">group</var>, this returns a list of representatives of the point group of <var class="Arg">group</var>. That is, a system of representatives for the factor group modulo translations. This is an attribute of <code class="keyw">AffineCrystGroupOnLeftOrRight</code></p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.