CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Views: 418346
1
<Chapter><Heading> Arrays and Pseudo lists</Heading>
2
3
<Table Align="|l|" >
4
5
<Row>
6
<Item>
7
<Index>Array</Index>
8
<C>Array(A,f)</C>
9
<P/>
10
Inputs an array <M>A</M> and a function <M>f</M>. It returns the the array obtained by applying <M>f</M> to each entry of <M>A</M> (and leaves <M>A</M> unchanged).
11
</Item>
12
</Row>
13
14
<Row>
15
<Item>
16
<Index>PermuteArray</Index>
17
<C>PermuteArray(A,f)</C>
18
<P/>
19
Inputs an array <M>A</M> of dimension <M>d</M> and a permutation <M>f</M> of degree at most <M>d</M>. It returns the array <M>B</M> defined by
20
<M>B[i1][i2]...[id] = A[f(i1)][f(i2)]...A[f(id)]</M> (and leaves <M>A</M> unchanged).
21
</Item>
22
</Row>
23
24
25
<Row>
26
<Item>
27
<Index>ArrayDimension</Index>
28
<C>ArrayDimension(A)</C>
29
<P/>
30
Inputs an array <M>A</M> and returns its dimension.
31
</Item>
32
</Row>
33
34
<Row>
35
<Item>
36
<Index>ArrayDimensions</Index>
37
<C>ArrayDimensions(A)</C>
38
<P/>
39
Inputs an array <M>A</M> and returns its dimensions.
40
</Item>
41
</Row>
42
43
<Row>
44
<Item>
45
<Index>ArraySum</Index>
46
<C>ArraySum(A)</C>
47
<P/>
48
Inputs an array <M>A</M> and returns the sum of its entries.
49
</Item>
50
</Row>
51
52
<Row>
53
<Item>
54
<Index>ArrayValue</Index>
55
<C>ArrayValue(A,x)</C>
56
<P/>
57
Inputs an array <M>A</M> and a coordinate vector <M>x</M>. It returns the value
58
of the entry in <M>A</M> with coordinate <M>x</M>.
59
</Item>
60
</Row>
61
62
63
<Row>
64
<Item>
65
<Index>ArrayValueFunctions</Index>
66
<C>ArrayValueFunctions(d)</C>
67
<P/>
68
Inputs a positive integer <M>d</M> and returns an efficient version of the function ArrayValue for arrays of dimension <M>d</M>.
69
</Item> </Row>
70
71
72
<Row>
73
<Item>
74
<Index>ArrayAssign</Index>
75
<C>ArrayAssign(A,x,n)</C>
76
<P/>
77
Inputs an array <M>A</M> and a coordinate vector <M>x</M> and an integer <M>n</M>. It sets the entry of <M>A</M> with coordinate <M>x</M> equal to <M>n</M>.
78
</Item>
79
</Row>
80
81
<Row>
82
<Item>
83
<Index>ArrayAssignFunctions</Index>
84
<C>ArrayAssignFunctions(d)</C>
85
<P/>
86
Inputs a positive integer <M>d</M> and returns an efficient version of the function ArrayAssign for arrays of dimension <M>d</M>.
87
</Item>
88
</Row>
89
90
<Row>
91
<Item>
92
<Index>ArrayIterate</Index>
93
<C>ArrayIterate(d)</C>
94
<P/>
95
Inputs a positive integer <M>d</M> and returns a function ArrayIt(Dimensions,f). This function inputs a list Dimensions of <M>d</M> positive integers and also a function <M>f(x)</M>. It applies the function <M>f(x)</M> to each integer
96
list <M>x</M> of length <M>d</M> with entries <M>x[i]</M> in the range [1..Dimension[i]].
97
</Item>
98
</Row>
99
100
<Row>
101
<Item>
102
<Index>BinaryArrayToTextFile</Index>
103
<C>BinaryArrayToTextFile(file,A)</C>
104
<P/>
105
Inputs a string containing the address of a file, and an array <M>A</M>
106
of 0s and 1s. The array represents a pure cubical complex. A
107
representation of this complex is written to the file in a format that
108
can be read by the CAPD (Computer Assisted Proofs in Dynamics) software developed by Marian Mrozek and others.
109
110
<P/> The second input <M>A</M> can also be a pure cubical complex.
111
</Item> </Row>
112
113
114
115
<Row>
116
<Item>
117
<Index>FrameArray</Index>
118
<C>FrameArray(A)</C>
119
<P/>
120
Inputs an array <M>A</M> and returns the array obtained by appending a 0 to the beginning and end of each "row" of the array.
121
</Item> </Row>
122
123
<Row>
124
<Item>
125
<Index>UnframeArray</Index>
126
<C>UnframeArray(A)</C>
127
<P/>
128
Inputs an array <M>A</M> and returns the array obtained by removing the first and last entry in each "row" of the array. </Item> </Row>
129
130
<Row>
131
<Item>
132
<Index>Add</Index>
133
<C>Add(L,x)</C>
134
135
136
<P/>
137
Let <M>L</M> be a pseudo list of length <M>n</M>, and <M>x</M>
138
an object compatible with the entries in <M>L</M>.
139
If <M>x</M> is not in <M>L</M> then this operation converts <M>L</M>
140
into a pseudo list of length n+1 by adding <M>x</M> as the
141
final entry. If <M>x</M> is in <M>L</M> the operation has no effect on <M>L</M>.
142
</Item>
143
</Row>
144
145
<Row>
146
<Item>
147
<Index>Append</Index>
148
<C>Append(L,K)</C>
149
150
151
<P/>
152
Let <M>L</M> be a pseudo list and <M>K</M> a list whose objects are compatible with those in <M>L</M>. This operation applies Add(L,x) for each x in <M>K</M>.
153
</Item></Row>
154
155
156
<Row>
157
<Item>
158
<Index>ListToPseudoList</Index>
159
<C>ListToPseudoList(L)</C>
160
161
162
<P/>
163
Inputs a list <M>L</M> and returns the pseudo list representation of <M>L</M>.
164
</Item>
165
</Row>
166
167
168
</Table>
169
</Chapter>
170
171
172
173