Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563638 views
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!-- This is an automatically generated file. -->
4
<Chapter Label="Chapter_Trees">
5
<Heading>Trees</Heading>
6
7
The trees are used in ToDoLists.
8
They are a technical feature, and fairly general, so they also can be used somewhere else.
9
<Section Label="Chapter_Trees_Section_Trees">
10
<Heading>Trees</Heading>
11
12
<ManSection>
13
<Filt Arg="arg" Name="IsTree" Label="for IsObject"/>
14
<Returns><C>true</C> or <C>false</C>
15
</Returns>
16
<Description>
17
The category of trees. A tree may have a content, a list of successors,
18
a predecessor and it knows if it is a leave of a tree or not.
19
</Description>
20
</ManSection>
21
22
23
<ManSection>
24
<Attr Arg="arg" Name="Content" Label="for IsTree"/>
25
<Returns>object
26
</Returns>
27
<Description>
28
The content of the tree.
29
May be any object.
30
</Description>
31
</ManSection>
32
33
34
<ManSection>
35
<Oper Arg="arg" Name="ListOfSuccessors" Label="for IsTree"/>
36
<Returns>a list of trees
37
</Returns>
38
<Description>
39
Returns the list of successors of a tree.
40
</Description>
41
</ManSection>
42
43
44
<ManSection>
45
<Oper Arg="arg" Name="Predecessor" Label="for IsTree"/>
46
<Returns>a tree or fail
47
</Returns>
48
<Description>
49
Returns the predecessor of a tree, or fail if there is none.
50
</Description>
51
</ManSection>
52
53
54
<ManSection>
55
<Oper Arg="arg" Name="ListOfSentinels" Label="for IsTree"/>
56
<Returns>a list
57
</Returns>
58
<Description>
59
Returns a list of leaves of the tree.
60
</Description>
61
</ManSection>
62
63
64
<ManSection>
65
<Oper Arg="arg" Name="RemoveHead" Label="for IsTree"/>
66
<Returns>a tree
67
</Returns>
68
<Description>
69
Returns the first successor of the tree, and adds all other successors of the
70
tree to the tree that is returned.
71
If the tree is a leave, it returns an empty tree.
72
If the tree is empty, it returns the tree itself.
73
</Description>
74
</ManSection>
75
76
77
<ManSection>
78
<Oper Arg="" Name="Tree" />
79
<Returns>a tree
80
</Returns>
81
<Description>
82
Returns an empty tree.
83
</Description>
84
</ManSection>
85
86
87
<ManSection>
88
<Oper Arg="obj" Name="Tree" Label="for IsObject"/>
89
<Returns>a tree
90
</Returns>
91
<Description>
92
Returns a tree with argument <A>obj</A>.
93
</Description>
94
</ManSection>
95
96
97
<ManSection>
98
<Oper Arg="tree,new_tree" Name="Add" Label="for IsTree, IsTree"/>
99
<Returns>nothing
100
</Returns>
101
<Description>
102
Adds the [list of] tree[s] <A>new_tree</A> as successor to the tree <A>tree</A>.
103
</Description>
104
</ManSection>
105
106
107
<ManSection>
108
<Oper Arg="sent" Name="ContentListFromSentinelToHead" Label="for IsTree"/>
109
<Returns>a list
110
</Returns>
111
<Description>
112
Returns a list of the contents of the trees from the leave <A>sent</A>
113
up to the content of the head of the tree.
114
</Description>
115
</ManSection>
116
117
118
<ManSection>
119
<Oper Arg="arg" Name="PostOrder" Label="for IsTree"/>
120
<Returns>a list
121
</Returns>
122
<Description>
123
Returns the contents of the nodes of the tree in post-order.
124
</Description>
125
</ManSection>
126
127
128
</Section>
129
130
131
</Chapter>
132
133
134