Tree SΒΆ

tree.spad line 1

Tree(S) is a basic domain of tree structures. Each tree is either empty or has a node consisting of a value and a list of (sub)trees.

#: % -> NonNegativeInteger
from Aggregate
=: (%, %) -> Boolean
from BasicType
~=: (%, %) -> Boolean
from BasicType
any?: (S -> Boolean, %) -> Boolean
from HomogeneousAggregate S
child?: (%, %) -> Boolean
from RecursiveAggregate S
children: % -> List %
from RecursiveAggregate S
coerce: % -> OutputForm
from CoercibleTo OutputForm
copy: % -> %
from Aggregate
count: (S -> Boolean, %) -> NonNegativeInteger
from HomogeneousAggregate S
count: (S, %) -> NonNegativeInteger
from HomogeneousAggregate S
cyclic?: % -> Boolean
cyclic?(t) tests if t is a cyclic tree.
cyclicCopy: % -> %
cyclicCopy(l) makes a copy of a (possibly) cyclic tree l.
cyclicEntries: % -> List %
cyclicEntries(t) returns a list of top-level cycles in tree t.
cyclicEqual?: (%, %) -> Boolean
cyclicEqual?(t1, t2) tests if two cyclic trees have the same structure.
cyclicParents: % -> List %
cyclicParents(t) returns a list of cycles that are parents of t.
distance: (%, %) -> Integer
from RecursiveAggregate S
elt: (%, value) -> S
from RecursiveAggregate S
empty: () -> %
from Aggregate
empty?: % -> Boolean
from Aggregate
eq?: (%, %) -> Boolean
from Aggregate
eval: (%, Equation S) -> % if S has Evalable S
from Evalable S
eval: (%, List Equation S) -> % if S has Evalable S
from Evalable S
eval: (%, List S, List S) -> % if S has Evalable S
from InnerEvalable(S, S)
eval: (%, S, S) -> % if S has Evalable S
from InnerEvalable(S, S)
every?: (S -> Boolean, %) -> Boolean
from HomogeneousAggregate S
hash: % -> SingleInteger
from SetCategory
hashUpdate!: (HashState, %) -> HashState
from SetCategory
latex: % -> String
from SetCategory
leaf?: % -> Boolean
from RecursiveAggregate S
leaves: % -> List S
from RecursiveAggregate S
less?: (%, NonNegativeInteger) -> Boolean
from Aggregate
map!: (S -> S, %) -> %
from HomogeneousAggregate S
map: (S -> S, %) -> %
from HomogeneousAggregate S
member?: (S, %) -> Boolean
from HomogeneousAggregate S
members: % -> List S
from HomogeneousAggregate S
more?: (%, NonNegativeInteger) -> Boolean
from Aggregate
node?: (%, %) -> Boolean
from RecursiveAggregate S
nodes: % -> List %
from RecursiveAggregate S
parts: % -> List S
from HomogeneousAggregate S
sample: %
from Aggregate
setchildren!: (%, List %) -> %
from RecursiveAggregate S
setelt!: (%, value, S) -> S
from RecursiveAggregate S
setvalue!: (%, S) -> S
from RecursiveAggregate S
size?: (%, NonNegativeInteger) -> Boolean
from Aggregate
tree: (S, List %) -> %
tree(nd, ls) creates a tree with value nd, and children ls.
tree: List S -> %
tree(ls) creates a tree from a list of elements of s.
tree: S -> %
tree(nd) creates a tree with value nd, and no children.
value: % -> S
from RecursiveAggregate S

Aggregate

BasicType

CoercibleTo OutputForm

Evalable S if S has Evalable S

finiteAggregate

HomogeneousAggregate S

InnerEvalable(S, S) if S has Evalable S

RecursiveAggregate S

SetCategory

shallowlyMutable