Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346<Chapter><Heading> Arrays and Pseudo lists</Heading>12<Table Align="|l|" >34<Row>5<Item>6<Index>Array</Index>7<C>Array(A,f)</C>8<P/>9Inputs 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).10</Item>11</Row>1213<Row>14<Item>15<Index>PermuteArray</Index>16<C>PermuteArray(A,f)</C>17<P/>18Inputs 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 by19<M>B[i1][i2]...[id] = A[f(i1)][f(i2)]...A[f(id)]</M> (and leaves <M>A</M> unchanged).20</Item>21</Row>222324<Row>25<Item>26<Index>ArrayDimension</Index>27<C>ArrayDimension(A)</C>28<P/>29Inputs an array <M>A</M> and returns its dimension.30</Item>31</Row>3233<Row>34<Item>35<Index>ArrayDimensions</Index>36<C>ArrayDimensions(A)</C>37<P/>38Inputs an array <M>A</M> and returns its dimensions.39</Item>40</Row>4142<Row>43<Item>44<Index>ArraySum</Index>45<C>ArraySum(A)</C>46<P/>47Inputs an array <M>A</M> and returns the sum of its entries.48</Item>49</Row>5051<Row>52<Item>53<Index>ArrayValue</Index>54<C>ArrayValue(A,x)</C>55<P/>56Inputs an array <M>A</M> and a coordinate vector <M>x</M>. It returns the value57of the entry in <M>A</M> with coordinate <M>x</M>.58</Item>59</Row>606162<Row>63<Item>64<Index>ArrayValueFunctions</Index>65<C>ArrayValueFunctions(d)</C>66<P/>67Inputs a positive integer <M>d</M> and returns an efficient version of the function ArrayValue for arrays of dimension <M>d</M>.68</Item> </Row>697071<Row>72<Item>73<Index>ArrayAssign</Index>74<C>ArrayAssign(A,x,n)</C>75<P/>76Inputs 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>.77</Item>78</Row>7980<Row>81<Item>82<Index>ArrayAssignFunctions</Index>83<C>ArrayAssignFunctions(d)</C>84<P/>85Inputs a positive integer <M>d</M> and returns an efficient version of the function ArrayAssign for arrays of dimension <M>d</M>.86</Item>87</Row>8889<Row>90<Item>91<Index>ArrayIterate</Index>92<C>ArrayIterate(d)</C>93<P/>94Inputs 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 integer95list <M>x</M> of length <M>d</M> with entries <M>x[i]</M> in the range [1..Dimension[i]].96</Item>97</Row>9899<Row>100<Item>101<Index>BinaryArrayToTextFile</Index>102<C>BinaryArrayToTextFile(file,A)</C>103<P/>104Inputs a string containing the address of a file, and an array <M>A</M>105of 0s and 1s. The array represents a pure cubical complex. A106representation of this complex is written to the file in a format that107can be read by the CAPD (Computer Assisted Proofs in Dynamics) software developed by Marian Mrozek and others.108109<P/> The second input <M>A</M> can also be a pure cubical complex.110</Item> </Row>111112113114<Row>115<Item>116<Index>FrameArray</Index>117<C>FrameArray(A)</C>118<P/>119Inputs 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.120</Item> </Row>121122<Row>123<Item>124<Index>UnframeArray</Index>125<C>UnframeArray(A)</C>126<P/>127Inputs 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>128129<Row>130<Item>131<Index>Add</Index>132<C>Add(L,x)</C>133134135<P/>136Let <M>L</M> be a pseudo list of length <M>n</M>, and <M>x</M>137an object compatible with the entries in <M>L</M>.138If <M>x</M> is not in <M>L</M> then this operation converts <M>L</M>139into a pseudo list of length n+1 by adding <M>x</M> as the140final entry. If <M>x</M> is in <M>L</M> the operation has no effect on <M>L</M>.141</Item>142</Row>143144<Row>145<Item>146<Index>Append</Index>147<C>Append(L,K)</C>148149150<P/>151Let <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>.152</Item></Row>153154155<Row>156<Item>157<Index>ListToPseudoList</Index>158<C>ListToPseudoList(L)</C>159160161<P/>162Inputs a list <M>L</M> and returns the pseudo list representation of <M>L</M>.163</Item>164</Row>165166167</Table>168</Chapter>169170171172173