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: 4183461[1X9 [33X[0;0YTrees[133X[101X23[33X[0;0YThe trees are used in ToDoLists. They are a technical feature, and fairly4general, so they also can be used somewhere else.[133X567[1X9.1 [33X[0;0YTrees[133X[101X89[1X9.1-1 IsTree[101X1011[29X[2XIsTree[102X( [3Xarg[103X ) [32X filter12[6XReturns:[106X [33X[0;10Y[10Xtrue[110X or [10Xfalse[110X[133X1314[33X[0;0YThe category of trees. A tree may have a content, a list of successors, a15predecessor and it knows if it is a leave of a tree or not.[133X1617[1X9.1-2 Content[101X1819[29X[2XContent[102X( [3Xarg[103X ) [32X attribute20[6XReturns:[106X [33X[0;10Yobject[133X2122[33X[0;0YThe content of the tree. May be any object.[133X2324[1X9.1-3 ListOfSuccessors[101X2526[29X[2XListOfSuccessors[102X( [3Xarg[103X ) [32X operation27[6XReturns:[106X [33X[0;10Ya list of trees[133X2829[33X[0;0YReturns the list of successors of a tree.[133X3031[1X9.1-4 Predecessor[101X3233[29X[2XPredecessor[102X( [3Xarg[103X ) [32X operation34[6XReturns:[106X [33X[0;10Ya tree or fail[133X3536[33X[0;0YReturns the predecessor of a tree, or fail if there is none.[133X3738[1X9.1-5 ListOfSentinels[101X3940[29X[2XListOfSentinels[102X( [3Xarg[103X ) [32X operation41[6XReturns:[106X [33X[0;10Ya list[133X4243[33X[0;0YReturns a list of leaves of the tree.[133X4445[1X9.1-6 RemoveHead[101X4647[29X[2XRemoveHead[102X( [3Xarg[103X ) [32X operation48[6XReturns:[106X [33X[0;10Ya tree[133X4950[33X[0;0YReturns the first successor of the tree, and adds all other successors of51the tree to the tree that is returned. If the tree is a leave, it returns an52empty tree. If the tree is empty, it returns the tree itself.[133X5354[1X9.1-7 Tree[101X5556[29X[2XTree[102X( ) [32X operation57[6XReturns:[106X [33X[0;10Ya tree[133X5859[33X[0;0YReturns an empty tree.[133X6061[1X9.1-8 Tree[101X6263[29X[2XTree[102X( [3Xobj[103X ) [32X operation64[6XReturns:[106X [33X[0;10Ya tree[133X6566[33X[0;0YReturns a tree with argument [3Xobj[103X.[133X6768[1X9.1-9 Add[101X6970[29X[2XAdd[102X( [3Xtree[103X, [3Xnew_tree[103X ) [32X operation71[6XReturns:[106X [33X[0;10Ynothing[133X7273[33X[0;0YAdds the [list of] tree[s] [3Xnew_tree[103X as successor to the tree [3Xtree[103X.[133X7475[1X9.1-10 ContentListFromSentinelToHead[101X7677[29X[2XContentListFromSentinelToHead[102X( [3Xsent[103X ) [32X operation78[6XReturns:[106X [33X[0;10Ya list[133X7980[33X[0;0YReturns a list of the contents of the trees from the leave [3Xsent[103X up to the81content of the head of the tree.[133X8283[1X9.1-11 PostOrder[101X8485[29X[2XPostOrder[102X( [3Xarg[103X ) [32X operation86[6XReturns:[106X [33X[0;10Ya list[133X8788[33X[0;0YReturns the contents of the nodes of the tree in post-order.[133X89909192