<?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://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML " >
</script >
<title >GAP (ToolsForHomalg) - Chapter 9: Trees</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="chap9" 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="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="chap8_mj.html" >[Previous Chapter]</a> <a href="chap10_mj.html" >[Next Chapter]</a> </div >
<p id="mathjaxlink" class="pcenter" ><a href="chap9.html" >[MathJax off]</a></p>
<p><a id="X82EAC5E57CAA5FC5" name="X82EAC5E57CAA5FC5" ></a></p>
<div class="ChapSects" ><a href="chap9_mj.html#X82EAC5E57CAA5FC5" >9 <span class="Heading" >Trees</span ></a>
<div class="ContSect" ><span class="tocline" ><span class="nocss" > </span ><a href="chap9_mj.html#X82EAC5E57CAA5FC5" >9.1 <span class="Heading" >Trees</span ></a>
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X7ACE7DC5811BC3E6" >9.1-1 IsTree</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X7F3BD31F8167E2AD" >9.1-2 Content</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X87364E1880BAFD86" >9.1-3 ListOfSuccessors</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X7963601778389D55" >9.1-4 Predecessor</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X7DBFDC727BD18391" >9.1-5 ListOfSentinels</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X82C8BE577AF4389D" >9.1-6 RemoveHead</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X81853D90786ACF86" >9.1-7 Tree</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X822ED357788C5AE8" >9.1-8 Tree</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X7C9C3B5F81D1B816" >9.1-9 Add</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X874C552787D43D73" >9.1-10 ContentListFromSentinelToHead</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap9_mj.html#X851053447BC5684C" >9.1-11 PostOrder</a></span >
</div ></div >
</div >
<h3>9 <span class="Heading" >Trees</span ></h3>
<p>The trees are used in ToDoLists. They are a technical feature, and fairly general, so they also can be used somewhere else.</p>
<p><a id="X82EAC5E57CAA5FC5" name="X82EAC5E57CAA5FC5" ></a></p>
<h4>9.1 <span class="Heading" >Trees</span ></h4>
<p><a id="X7ACE7DC5811BC3E6" name="X7ACE7DC5811BC3E6" ></a></p>
<h5>9.1-1 IsTree</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IsTree</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( filter )</td ></tr ></table ></div >
<p>Returns: <code class="keyw" >true</code > or <code class="keyw" >false</code ></p>
<p>The category of trees. A tree may have a content, a list of successors, a predecessor and it knows if it is a leave of a tree or not.</p>
<p><a id="X7F3BD31F8167E2AD" name="X7F3BD31F8167E2AD" ></a></p>
<h5>9.1-2 Content</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Content</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( attribute )</td ></tr ></table ></div >
<p>Returns: object </p>
<p>The content of the tree. May be any object .</p>
<p><a id="X87364E1880BAFD86" name="X87364E1880BAFD86" ></a></p>
<h5>9.1-3 ListOfSuccessors</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ListOfSuccessors</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a list of trees</p>
<p>Returns the list of successors of a tree.</p>
<p><a id="X7963601778389D55" name="X7963601778389D55" ></a></p>
<h5>9.1-4 Predecessor</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Predecessor</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a tree or fail</p>
<p>Returns the predecessor of a tree, or fail if there is none.</p>
<p><a id="X7DBFDC727BD18391" name="X7DBFDC727BD18391" ></a></p>
<h5>9.1-5 ListOfSentinels</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ListOfSentinels</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a list</p>
<p>Returns a list of leaves of the tree.</p>
<p><a id="X82C8BE577AF4389D" name="X82C8BE577AF4389D" ></a></p>
<h5>9.1-6 RemoveHead</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ RemoveHead</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a tree</p>
<p>Returns the first successor of the tree, and adds all other successors of the tree to the tree that is returned. If the tree is a leave, it returns an empty tree. If the tree is empty, it returns the tree itself.</p>
<p><a id="X81853D90786ACF86" name="X81853D90786ACF86" ></a></p>
<h5>9.1-7 Tree</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Tree</code >( )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a tree</p>
<p>Returns an empty tree.</p>
<p><a id="X822ED357788C5AE8" name="X822ED357788C5AE8" ></a></p>
<h5>9.1-8 Tree</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Tree</code >( <var class="Arg" >obj</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a tree</p>
<p>Returns a tree with argument <var class="Arg" >obj</var >.</p>
<p><a id="X7C9C3B5F81D1B816" name="X7C9C3B5F81D1B816" ></a></p>
<h5>9.1-9 Add</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Add</code >( <var class="Arg" >tree</var >, <var class="Arg" >new_tree</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: nothing</p>
<p>Adds the [list of] tree[s] <var class="Arg" >new_tree</var > as successor to the tree <var class="Arg" >tree</var >.</p>
<p><a id="X874C552787D43D73" name="X874C552787D43D73" ></a></p>
<h5>9.1-10 ContentListFromSentinelToHead</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ContentListFromSentinelToHead</code >( <var class="Arg" >sent</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a list</p>
<p>Returns a list of the contents of the trees from the leave <var class="Arg" >sent</var > up to the content of the head of the tree.</p>
<p><a id="X851053447BC5684C" name="X851053447BC5684C" ></a></p>
<h5>9.1-11 PostOrder</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ PostOrder</code >( <var class="Arg" >arg</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>Returns: a list</p>
<p>Returns the contents of the nodes of the tree in post-order.</p>
<div class="chlinkprevnextbot" > <a href="chap0_mj.html" >[Top of Book]</a> <a href="chap0_mj.html#contents" >[Contents]</a> <a href="chap8_mj.html" >[Previous Chapter]</a> <a href="chap10_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="chapInd_mj.html" >Ind</a> </div >
<hr />
<p class="foot" >generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc " >GAPDoc2HTML</a></p>
</body >
</html >
quality 100%
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet)
¤
*© Formatika GbR, Deutschland