Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/simpcomp/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.2.2022 mit Größe 40 kB image not shown  

Quelle  chap13_mj.html   Sprache: HTML

 
 products/sources/formale Sprachen/GAP/pkg/simpcomp/doc/chap13_mj.html


<?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>
<script type="text/javascript"
  src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<title>GAP (simpcomp) - Chapter 13: Library and I/O</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" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap13"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a>  <a href="chap1_mj.html">1</a>  <a href="chap2_mj.html">2</a>  <a href="chap3_mj.html">3</a>  <a href="chap4_mj.html">4</a>  <a href="chap5_mj.html">5</a>  <a href="chap6_mj.html">6</a>  <a href="chap7_mj.html">7</a>  <a href="chap8_mj.html">8</a>  <a href="chap9_mj.html">9</a>  <a href="chap10_mj.html">10</a>  <a href="chap11_mj.html">11</a>  <a href="chap12_mj.html">12</a>  <a href="chap13_mj.html">13</a>  <a href="chap14_mj.html">14</a>  <a href="chap15_mj.html">15</a>  <a href="chap16_mj.html">16</a>  <a href="chap17_mj.html">17</a>  <a href="chap18_mj.html">18</a>  <a href="chapBib_mj.html">Bib</a>  <a href="chapInd_mj.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0_mj.html">[Top of Book]</a>   <a href="chap0_mj.html#contents">[Contents]</a>    <a href="chap12_mj.html">[Previous Chapter]</a>    <a href="chap14_mj.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap13.html">[MathJax off]</a></p>
<p><a id="X82F59668851B5E80" name="X82F59668851B5E80"></a></p>
<div class="ChapSects"><a href="chap13_mj.html#X82F59668851B5E80">13 <span class="Heading">Library and I/O</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap13_mj.html#X7F84F1AD7AFB97CF">13.1 <span class="Heading">Simplicial complex library</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7CBF051F7A1CC321">13.1-1 SCIsLibRepository</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7BDFDE6C81F9F70E">13.1-2 SCLib</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X85A9A589831467BB">13.1-3 SCLibAdd</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7C0F9B7E868800C7">13.1-4 SCLibAllComplexes</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X802B22077DB1F14B">13.1-5 SCLibDelete</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X8320F68178796D4D">13.1-6 SCLibDetermineTopologicalType</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7C3151F280BC8754">13.1-7 SCLibFlush</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X83A6586583F544F3">13.1-8 SCLibInit</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X83D638237BDE2C1C">13.1-9 SCLibIsLoaded</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7AEF58507E5AB88E">13.1-10 SCLibSearchByAttribute</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X80EA086A80F86814">13.1-11 SCLibSearchByName</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X80BD14648113130B">13.1-12 SCLibSize</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7A0856987A87A3C5">13.1-13 SCLibUpdate</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X843A039E78D5A97B">13.1-14 SCLibStatus</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap13_mj.html#X8599D6D37F402950">13.2 <span class="Heading"><strong class="pkg">simpcomp</stronginput / output functions</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X867AFE4D7A2AA736">13.2-1 SCLoad</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X8365D45D8765D3E8">13.2-2 SCLoadXML</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X817CF3A184C93782">13.2-3 SCSave</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7F7BDE477986435C">13.2-4 SCSaveXML</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X819FBFED81090969">13.2-5 SCExportMacaulay2</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7F214CF77E65C1A9">13.2-6 SCExportPolymake</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X871C94B978881445">13.2-7 SCImportPolymake</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X790C0AD9807A5D82">13.2-8 SCExportLatexTable</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X859BCB9986B55E14">13.2-9 SCExportJavaView</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X87B05F177D4C2F27">13.2-10 SCExportRecognizer</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap13_mj.html#X7B933EA27E8E79C8">13.2-11 SCExportSnapPy</a></span>
</div></div>
</div>

<h3>13 <span class="Heading">Library and I/O</span></h3>

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

<h4>13.1 <span class="Heading">Simplicial complex library</span></h4>

<p><strong class="pkg">simpcomp</strong> contains a library of simplicial complexes on few vertices, most of them (combinatorial) triangulations of manifolds and pseudomanifolds. The user can load these known triangulations from the library in order to study their properties or to construct new triangulations out of the known ones. For example, a user could determine the topological type of a given triangulation -- which can be quite tedious if done by hand -- by establishing a PL equivalence to a complex in the library.</p>

<p>Among other known triangulations, the library contains all of the vertex transitive triangulations of combinatorial manifolds with up to <span class="SimpleMath">\(15\)</span> vertices (for <span class="SimpleMath">\(d \in \{ 2,3,9,10,11,12\}\)</span>) and up to <span class="SimpleMath">\(13\)</span> vertices (for <span class="SimpleMath">\(d \in \{ 4,5,6,7,8 \}\)</span>) and all of the vertex transitive combinatorial pseudomanifolds with up to <span class="SimpleMath">\(15\)</span> vertices (for <span class="SimpleMath">\(d=3\)</span>) and up to <span class="SimpleMath">\(13\)</span> vertices (for <span class="SimpleMath">\(d \in \{ 4,5,6,7 \} \)</span>) classified by Frank Lutz that can be found on his ``Manifold Page'' <span class="URL"><a href="http://www.math.tu-berlin.de/diskregeom/stellar/">http://www.math.tu-berlin.de/diskregeom/stellar/</a></span>, along with some triangulations of sphere bundles and some bounded triangulated PL-manifolds.</p>

<p>See <code class="func">SCLib</code> (<a href="chap13_mj.html#X7BDFDE6C81F9F70E"><span class="RefLink">13.1-2</span></a>) for a naming convention used for the global library of <strong class="pkg">simpcomp</strong>. Note: Another way of storing and loading complexes is provided by the functions <code class="func">SCExportIsoSig</code> (<a href="chap6_mj.html#X80098C5F7B80A621"><span class="RefLink">6.2-2</span></a>), <code class="func">SCExportToString</code> (<a href="chap6_mj.html#X7E95E36680C188C4"><span class="RefLink">6.2-1</span></a>) and <code class="func">SCFromIsoSig</code> (<a href="chap6_mj.html#X7E915DA7821DD513"><span class="RefLink">6.2-3</span></a>), see Section <a href="chap6_mj.html#X867E1FF580230E20"><span class="RefLink">6.2</span></a> for details.</p>

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

<h5>13.1-1 SCIsLibRepository</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCIsLibRepository</code>( <var class="Arg">object</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Filter for the category of a library repository <code class="code">SCIsLibRepository</code> used by the <strong class="pkg">simpcomp</strong> library. The category <code class="code">SCLibRepository</code> is derived from the category <code class="code">SCPropertyObject</code>.</p>


<div class="example"><pre>
 gap> SCIsLibRepository(SCLib); #the global library is stored in SCLib
 true
 </pre></div>

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

<h5>13.1-2 SCLib</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLib</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>The global variable <code class="code">SCLib</code> contains the library object of the global library of <strong class="pkg">simpcomp</strong> through which the user can access the library. The path to the global library is <code class="code">GAPROOT/pkg/simpcomp/complexes</code>.</p>

<p>The naming convention in the global library is the following: complexes are usually named by their topological type. As usual, `S^d' denotes a \(d\)-sphere, `T' a torus, `x' the cartesian product, `~' the twisted product and `#' the connected sum. The Klein Bottle is denoted by `K' or `K^2'.




<div class="example"><pre>
 gap> SCLib;
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=648
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/home/jonathan/bin/gap-4.11.1/pkg/simpcomp/complexes/"
 ]
 gap> SCLib.Size;
 648
 gap> SCLib.SearchByName("S^4~");
 [ [ 203, "S^4~S^1 (VT)" ], [ 330, "S^4~S^1 (VT)" ], [ 332, "S^4~S^1 (VT)" ], 
   [ 395, "S^4~S^1 (VT)" ], [ 451, "S^4~S^1 (VT)" ], [ 452, "S^4~S^1 (VT)" ], 
   [ 453, "S^4~S^1 (VT)" ], [ 454, "S^4~S^1 (VT)" ], [ 455, "S^4~S^1 (VT)" ], 
   [ 458, "S^4~S^1 (VT)" ], [ 459, "S^4~S^1 (VT)" ], [ 460, "S^4~S^1 (VT)" ] ]
 gap> SCLib.Load(last[1][1]);          
 <SimplicialComplex: S^4~S^1 (VT) | dim = 5 | n = 13>
 </pre></div>

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

<h5>13.1-3 SCLibAdd</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibAdd</code>( <var class="Arg">repository</var>, <var class="Arg">complex</var>[, <var class="Arg">name</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Adds a given simplicial complex <var class="Arg">complex</var> to a given repository <var class="Arg">repository</var> of type <code class="code">SCIsLibRepository</code>. <var class="Arg">complex</var> is saved to a file with suffix <code class="code">.sc</code> in the repositories base path, where the file name is either formed from the optional argument <var class="Arg">name</var> and the current time or taken from the name of the complex, if it is named.</p>


<div class="example"><pre>
 gap> info:=InfoLevel(InfoSimpcomp);;
 gap> SCInfoLevel(0);;
 gap> myRepository:=SCLibInit("/tmp/repository");
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=0
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/tmp/repository/"
 ]
 gap> complex1:=SCBdCrossPolytope(4);;
 gap> SCLibAdd(myRepository,complex1);
 true
 gap> complex2:=SCBdCrossPolytope(4);;
 gap> myRepository.Add(complex2);; # alternative syntax
 gap> SCInfoLevel(info);;
 </pre></div>

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

<h5>13.1-4 SCLibAllComplexes</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibAllComplexes</code>( <var class="Arg">repository</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: list of entries of the form <code class="code">[ integer, string ]</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Returns a list with entries of the form <code class="code">[ ID, NAME ]</code> of all the complexes in the given repository <var class="Arg">repository</var> of type <code class="code">SCIsLibRepository</code>.</p>


<div class="example"><pre>
 gap> all:=SCLibAllComplexes(SCLib);;
 gap> all[1];
 [ 1, "Moebius Strip" ]
 gap> Length(all);
 648
 </pre></div>

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

<h5>13.1-5 SCLibDelete</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibDelete</code>( <var class="Arg">repository</var>, <var class="Arg">id</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Deletes the simplicial complex with the given id <var class="Arg">id</var> from the given repository <var class="Arg">repository</var>. Apart from deleting the complexes' index entry, the associated .sc file is also deleted.




<div class="example"><pre>
 gap> myRepository:=SCLibInit("/tmp/repository");
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=2
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/tmp/repository/"
 ]
 gap> SCLibAdd(myRepository,SCSimplex(2));;
 gap> SCLibDelete(myRepository,1);
 true
 </pre></div>

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

<h5>13.1-6 SCLibDetermineTopologicalType</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibDetermineTopologicalType</code>( [<var class="Arg">repository</var>, ]<var class="Arg">complex</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: simplicial complex of type <code class="code">SCSimplicialComplex</code> or a list of integers upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Tries to determine the topological type of a given complex <var class="Arg">complex</var> by first looking for complexes with matching homology in the library repository <var class="Arg">repository</var> (if no repository is passed, the global repository <code class="code">SCLib</code> is used) and either returns a simplicial complex object (that is combinatorially isomorphic to the complex given) or a list of library ids of complexes in the library with the same homology as the complex provided.</p>

<p>The ids obtained in this way can then be used to compare the corresponding complexes with <var class="Arg">complex</var> via the function <code class="func">SCEquivalent</code> (<a href="chap9_mj.html#X80BDA87D86E67B02"><span class="RefLink">9.2-2</span></a>).</p>

<p>If <var class="Arg">complex</var> is a combinatorial manifold of dimension <span class="SimpleMath">\(1\)</span> or <span class="SimpleMath">\(2\)</span> its topological type is computed, stored to the property <code class="code">TopologicalType</code> and <var class="Arg">complex</var> is returned.</p>

<p>If no complexes with matching homology can be found, the empty set is returned.</p>


<div class="example"><pre>
 gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],
                       [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);;
 gap> SCLibDetermineTopologicalType(c);
 <SimplicialComplex: unnamed complex 250 | dim = 2 | n = 6>
 </pre></div>

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

<h5>13.1-7 SCLibFlush</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibFlush</code>( <var class="Arg">repository</var>, <var class="Arg">confirm</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Completely empties a given repository <var class="Arg">repository</var>. The index and all simplicial complexes in this repository are deleted. The second argument, <var class="Arg">confirm</var>, must be the string <code class="code">"yes"</code> in order to confirm the deletion.</p>


<div class="example"><pre>
 gap> myRepository:=SCLibInit("/tmp/repository");;
 gap> SCLibFlush(myRepository,"yes");
 #I  SCLibInit: invalid parameters.
 true
 </pre></div>

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

<h5>13.1-8 SCLibInit</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibInit</code>( <var class="Arg">dir</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: library repository of type <code class="code">SCLibRepository</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>This function initializes a library repository object for the given directory <var class="Arg">dir</var> (which has to be provided in form of a <strong class="pkg">GAP</strongobject of type <code class="code">String</code> or <code class="code">Directory</code>) and returns that library repository object in case of success. The returned object then provides a mean to access the library repository via the <code class="code">SCLib</code>-functions of <strong class="pkg">simpcomp</strong>.</p>

<p>The global library repository of <strong class="pkg">simpcomp</strong> is loaded automatically at startup and is stored in the variable <code class="code">SCLib</code>. User repositories can be created by calling <code class="code">SCLibInit</code> with a desired destination directory. Note that each repository must reside in a different path since otherwise data may get lost.</p>

<p>The function first tries to load the repository index for the given directory to rebuild it (by calling <code class="code">SCLibUpdate</code>) if loading the index fails. The library index of a library repository is stored in its base path in the XML file <code class="code">complexes.idx</code>, the complexes are stored in files with suffix <code class="code">.sc</code>, also in XML format.</p>


<div class="example"><pre>
 gap> myRepository:=SCLibInit("/tmp/repository");
 #I  SCLibInit: made directory "/tmp/repository/" for user library.
 #I  SCIntFunc.SCLibInit: index not found -- trying to reconstruct it.
 #I  SCLibUpdate: rebuilding index for /tmp/repository/.
 #I  SCLibUpdate: rebuilding index done.
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=0
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/tmp/repository/"
 ]
 </pre></div>

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

<h5>13.1-9 SCLibIsLoaded</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibIsLoaded</code>( <var class="Arg">repository</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code> upon succes, <code class="keyw">fail</code> otherwise.</p>

<p>Returns <code class="keyw">true</code> when a given library repository <var class="Arg">repository</var> is in loaded state. This means that the directory of this repository is accessible and a repository index file for this repository exists in the repositories' path. If this is not the case false is returned.




<div class="example"><pre>
 gap> SCLibIsLoaded(SCLib);
 true
 gap> SCLib.IsLoaded;
 true
 </pre></div>

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

<h5>13.1-10 SCLibSearchByAttribute</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibSearchByAttribute</code>( <var class="Arg">repository</var>, <var class="Arg">expr</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list of items of the form <code class="code">[ integer, string ]</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Searches a given repository <var class="Arg">repository</var> for complexes for which the boolean expression <var class="Arg">expr</var>, passed as string, evaluates to <code class="keyw">true</code> and returns a list of complexes with entries of the form <code class="code">[ID, NAME]</code> or <code class="keyw">fail</code> upon error. The expression may use all <strong class="pkg">GAP</strong> functions and can access all the indexed attributes of the complexes in the given repository for the query. The standard attributes are: Dim (Dimension), F (f-vector), G (g-vector), H (h-vector), Chi (Euler characteristic), Homology, Name, IsPM, IsManifold. See <code class="code">SCLib</code> for the set of indexed attributes of the global library of <strong class="pkg">simpcomp</strong>.</p>


<div class="example"><pre>
 gap> SCLibSearchByAttribute(SCLib,"Dim=4 and F[3]=Binomial(F[1],3)");
 [ [ 16, "CP^2 (VT)" ], [ 520, "K3_16" ] ]
 gap> SCLib.SearchByAttribute("Dim=4 and F[3]=Binomial(F[1],3)");
 [ [ 16, "CP^2 (VT)" ], [ 520, "K3_16" ] ]
 </pre></div>

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

<h5>13.1-11 SCLibSearchByName</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibSearchByName</code>( <var class="Arg">repository</var>, <var class="Arg">name</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list of items of the form <code class="code">[ integer, string ]</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Searches a given repository <var class="Arg">repository</var> for complexes that contain the string <var class="Arg">name</var> as a substring of their name attribute and returns a list of the complexes found with entries of the form <code class="code">[ID, NAME]</code>. See <code class="func">SCLib</code> (<a href="chap13_mj.html#X7BDFDE6C81F9F70E"><span class="RefLink">13.1-2</span></a>) for a naming convention used for the global library of <strong class="pkg">simpcomp</strong>.</p>


<div class="example"><pre>
 gap> SCLibSearchByName(SCLib,"K3");
 [ [ 520, "K3_16" ], [ 539, "K3_17" ] ]
 gap> SCLib.SearchByName("K3"); #alternative syntax
 [ [ 520, "K3_16" ], [ 539, "K3_17" ] ]
 gap> SCLib.SearchByName("S^4x"); #search for products with S^4
 [ [ 282, "S^4xS^1 (VT)" ], [ 329, "S^4xS^1 (VT)" ], [ 331, "S^4xS^1 (VT)" ] ]
 </pre></div>

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

<h5>13.1-12 SCLibSize</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibSize</code>( <var class="Arg">repository</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: integer upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Returns the number of complexes contained in the given repository <var class="Arg">repository</var>. Fails if the library repository was not previously loaded with <code class="code">SCLibInit</code>.</p>


<div class="example"><pre>
 gap> SCLibSize(SCLib); #SCLib is the repository of the global library
 648
 </pre></div>

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

<h5>13.1-13 SCLibUpdate</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibUpdate</code>( <var class="Arg">repository</var>[, <var class="Arg">recalc</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: library repository of type <code class="code">SCLibRepository</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Recreates the index of a given repository (either via a repository object or a base path of a repository <var class="Arg">repository</var>) by scanning the base path for all <code class="code">.sc</code> files containing simplicial complexes of the repository. Returns a repository object with the newly created index on success or <code class="keyw">fail</code> in case of an error. The optional boolean argument <var class="Arg">recalc</var> forces <strong class="pkg">simpcomp</strong> to recompute all the indexed properties (such as f-vector, homology, etc.) of the simplicial complexes in the repository if set to <code class="keyw">true</code>.</p>


<div class="example"><pre>
 gap> myRepository:=SCLibInit("/tmp/repository");;
 gap> SCLibUpdate(myRepository);
 #I  SCLibUpdate: rebuilding index for /tmp/repository/.
 #I  SCLibUpdate: rebuilding index done.
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=0
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/tmp/repository/"
 ]
 </pre></div>

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

<h5>13.1-14 SCLibStatus</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLibStatus</code>( <var class="Arg">repository</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: library repository of type <code class="code">SCLibRepository</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Lets <strong class="pkg">GAP</strong> print the status of a given library repository <var class="Arg">repository</var>. <code class="code">IndexAttributes</code> is the list of attributes indexed for this repository. If <code class="code">CalculateIndexAttributes</code> is true, the index attributes for a complex added to the library are calculated automatically upon addition of the complex, otherwise this is left to the user and only pre-calculated attributes are indexed.</p>


<div class="example"><pre>
 gap> SCLibStatus(SCLib);
 [Simplicial complex library. Properties:
 CalculateIndexAttributes=true
 Number of complexes in library=648
 IndexAttributes=[ "Name""Dim""F""G""H""Chi""Homology""IsPM"
   "IsManifold" ]
 Loaded=true
 Path="/home/jonathan/bin/gap-4.11.1/pkg/simpcomp/complexes/"
 ]
 </pre></div>

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

<h4>13.2 <span class="Heading"><strong class="pkg">simpcomp</stronginput / output functions</span></h4>

<p>This section contains a description of the input/output-functionality provided by <strong class="pkg">simpcomp</strong>. The package provides the functionality to save and load simplicial complexes (and their known properties) to, respectively from files in XML format. Furthermore, it provides the user with functions to export simplicial complexes into polymake format (for this format there also exists rudimentary import functionality), as JavaView geometry or in form of a LaTeX table. For importing more complex polymake data the package polymaking <a href="chapBib_mj.html#biBRoeder07Polymaking">[R\t13]</a> can be used.</p>

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

<h5>13.2-1 SCLoad</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLoad</code>( <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: simplicial complex of type <code class="code">SCSimplicialComplex</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Loads a simplicial complex stored in a binary format (using <code class="code">IO_Pickle</code>) from a file specified in <var class="Arg">filename</var> (as string). If <var class="Arg">filename</var> does not end in <code class="code">.scb</code>, this suffix is appended to the file name.</p>


<div class="example"><pre>
 gap> c:=SCBdSimplex(3);;
 gap> SCSave(c,"/tmp/bddelta3");
 true
 gap> d:=SCLoad("/tmp/bddelta3");
 <SimplicialComplex: S^2_4 | dim = 2 | n = 4>
 gap> c=d;
 true
 </pre></div>

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

<h5>13.2-2 SCLoadXML</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCLoadXML</code>( <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: simplicial complex of type <code class="code">SCSimplicialComplex</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Loads a simplicial complex stored in XML format from a file specified in <var class="Arg">filename</var> (as string). If <var class="Arg">filename</var> does not end in <code class="code">.sc</code>, this suffix is appended to the file name.</p>


<div class="example"><pre>
 gap> c:=SCBdSimplex(3);;
 gap> SCSaveXML(c,"/tmp/bddelta3");
 true
 gap> d:=SCLoadXML("/tmp/bddelta3");
 <SimplicialComplex: S^2_4 | dim = 2 | n = 4>
 gap> c=d;
 true
 </pre></div>

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

<h5>13.2-3 SCSave</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCSave</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Saves a simplicial complex in a binary format (using <code class="code">IO_Pickle</code>) to a file specified in <var class="Arg">filename</var> (as string). If <var class="Arg">filename</var> does not end in <code class="code">.scb</code>, this suffix is appended to the file name.</p>


<div class="example"><pre>
 gap> c:=SCBdSimplex(3);;
 gap> SCSave(c,"/tmp/bddelta3");
 true
 </pre></div>

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

<h5>13.2-4 SCSaveXML</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCSaveXML</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Saves a simplicial complex <var class="Arg">complex</var> to a file specified by <var class="Arg">filename</var> (as string) in XML format. If <var class="Arg">filename</var> does not end in <code class="code">.sc</code>, this suffix is appended to the file name.</p>


<div class="example"><pre>
 gap> c:=SCBdSimplex(3);;
 gap> SCSaveXML(c,"/tmp/bddelta3");
 true
 </pre></div>

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

<h5>13.2-5 SCExportMacaulay2</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportMacaulay2</code>( <var class="Arg">complex</var>, <var class="Arg">ring</var>, <var class="Arg">filename</var>[, <var class="Arg">alphalabels</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the facet list of a given simplicial complex <var class="Arg">complex</var> in <code class="code">Macaulay2</code> format to a file specified by <var class="Arg">filename</var>. The argument <var class="Arg">ring</var> can either be the ring of integers (specified by <code class="code">Integers</code>) or the ring of rationals (sepcified by <code class="code">Rationals</code>). The optional boolean argument <var class="Arg">alphalabels</var> labels the complex with characters from <span class="SimpleMath">\(a, \dots ,z\)</span> in the exported file if a value of <code class="keyw">true</code> is supplied, while the standard labeling of the vertices is <span class="SimpleMath">\(v_1, \dots ,v_n\)</span> where <span class="SimpleMath">\(n\)</span> is the number of vertices of <var class="Arg">complex</var>. If <var class="Arg">complex</var> has more than <span class="SimpleMath">\(26\)</span> vertices, the argument <var class="Arg">alphalabels</var> is ignored.</p>


<div class="example"><pre>
 gap> c:=SCBdCrossPolytope(4);;
 gap> SCExportMacaulay2(c,Integers,"/tmp/bdbeta4.m2");
 true
 </pre></div>

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

<h5>13.2-6 SCExportPolymake</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportPolymake</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the facet list with vertex labels of a given simplicial complex <var class="Arg">complex</var> in <code class="code">polymake</code> format to a file specified by <var class="Arg">filename</var>. Currently, only the export in the format of <code class="code">polymake</code> version 2.3 is supported.</p>


<div class="example"><pre>
 gap> c:=SCBdCrossPolytope(4);;
 gap> SCExportPolymake(c,"/tmp/bdbeta4.poly");
 true
 </pre></div>

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

<h5>13.2-7 SCImportPolymake</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCImportPolymake</code>( <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: simplicial complex of type <code class="code">SCSimplicialComplex</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Imports the facet list of a <code class="code">topaz</code> <code class="code">polymake</code> file specified by <var class="Arg">filename</var> (discarding any vertex labels) and creates a simplicial complex object from these facets.</p>


<div class="example"><pre>
 gap> c:=SCBdCrossPolytope(4);;
 gap> SCExportPolymake(c,"/tmp/bdbeta4.poly");
 true
 gap> d:=SCImportPolymake("/tmp/bdbeta4.poly");
 <SimplicialComplex: polymake import '/tmp/bdbeta4.poly' | dim = 3 | n = 8>
 gap> c=d;
 true
 </pre></div>

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

<h5>13.2-8 SCExportLatexTable</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportLatexTable</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var>, <var class="Arg">itemsperline</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> on success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the facet list of a given simplicial complex <var class="Arg">complex</var> (or any list given as first argument) in form of a LaTeX table to a file specified by <var class="Arg">filename</var>. The argument <var class="Arg">itemsperline</var> specifies how many columns the exported table should have. The faces are exported in the format <span class="SimpleMath">\(\langle v_1,\dots,v_k \rangle\)</span>.</p>


<div class="example"><pre>
 gap> c:=SCBdSimplex(5);;
 gap> SCExportLatexTable(c,"/tmp/bd5simplex.tex",5);
 true
 </pre></div>

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

<h5>13.2-9 SCExportJavaView</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportJavaView</code>( <var class="Arg">complex</var>, <var class="Arg">file</var>, <var class="Arg">coords</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> on success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the 2-skeleton of the given simplicial complex <var class="Arg">complex</var> (or the facets if the complex is of dimension 2 or less) in <code class="code">JavaView</code> format (file name suffix <code class="code">.jvx</code>) to a file specified by <var class="Arg">filename</var> (as string). The list <var class="Arg">coords</var> must contain a <span class="SimpleMath">\(3\)</span>-tuple of real coordinates for each vertex of <var class="Arg">complex</var>, either as tuple of length three containing the coordinates (Warning: as <strong class="pkg">GAP</strong> only has rudimentary support for floating point values, currently only integer numbers can be used as coordinates when providing <var class="Arg">coords</var> as list of <span class="SimpleMath">\(3\)</span>-tuples) or as string of the form <code class="code">"x.x y.y z.z"</code> with decimal numbers <code class="code">x.x</code>, <code class="code">y.y</code>, <code class="code">z.z</code> for the three coordinates (i.e. <code class="code">"1.0 0.0 0.0"</code>).</p>


<div class="example"><pre>
 gap> coords:=[[1,0,0],[0,1,0],[0,0,1]];;
 gap> SCExportJavaView(SCBdSimplex(2),"/tmp/triangle.jvx",coords);
 true
 </pre></div>

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

<h5>13.2-10 SCExportRecognizer</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportRecognizer</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the gluings of the tetrahedra of a given combinatorial <span class="SimpleMath">\(3\)</span>-manifold <var class="Arg">complex</var> in a format compatible with Matveev's \(3\)-manifold software Recognizer.




<div class="example"><pre>
 gap> c:=SCBdCrossPolytope(4);;
 gap> SCExportRecognizer(c,"/tmp/bdbeta4.mv");
 true
 </pre></div>

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

<h5>13.2-11 SCExportSnapPy</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SCExportSnapPy</code>( <var class="Arg">complex</var>, <var class="Arg">filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> upon success, <code class="keyw">fail</code> otherwise.</p>

<p>Exports the facet list and orientability of a given combinatorial <span class="SimpleMath">\(3\)</span>-pseudomanifold <var class="Arg">complex</var> in <code class="code">SnapPy</code> format to a file specified by <var class="Arg">filename</var>.</p>


<div class="example"><pre>
 gap> SCLib.SearchByAttribute("Dim=3 and F=[8,28,56,28]");
 [ [ 8, "PM^3 - TransitiveGroup(8,43), No. 1" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCExportSnapPy(c,"/tmp/M38.tri");
 true
 </pre></div>


<div class="chlinkprevnextbot"> <a href="chap0_mj.html">[Top of Book]</a>   <a href="chap0_mj.html#contents">[Contents]</a>    <a href="chap12_mj.html">[Previous Chapter]</a>    <a href="chap14_mj.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a>  <a href="chap1_mj.html">1</a>  <a href="chap2_mj.html">2</a>  <a href="chap3_mj.html">3</a>  <a href="chap4_mj.html">4</a>  <a href="chap5_mj.html">5</a>  <a href="chap6_mj.html">6</a>  <a href="chap7_mj.html">7</a>  <a href="chap8_mj.html">8</a>  <a href="chap9_mj.html">9</a>  <a href="chap10_mj.html">10</a>  <a href="chap11_mj.html">11</a>  <a href="chap12_mj.html">12</a>  <a href="chap13_mj.html">13</a>  <a href="chap14_mj.html">14</a>  <a href="chap15_mj.html">15</a>  <a href="chap16_mj.html">16</a>  <a href="chap17_mj.html">17</a>  <a href="chap18_mj.html">18</a>  <a href="chapBib_mj.html">Bib</a>  <a href="chapInd_mj.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>

100%


¤ Dauer der Verarbeitung: 0.26 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.