BinaryRecursiveAggregate SΒΆ

aggcat.spad line 1127 [edit on github]

A binary-recursive aggregate has 0, 1 or 2 children and serves as a model for a binary tree or a doubly-linked aggregate structure

#: % -> NonNegativeInteger if % has finiteAggregate

from Aggregate

=: (%, %) -> Boolean if S has SetCategory or % has finiteAggregate and S has BasicType

from BasicType

~=: (%, %) -> Boolean if S has SetCategory or % has finiteAggregate and S has BasicType

from BasicType

any?: (S -> Boolean, %) -> Boolean if % has finiteAggregate

from HomogeneousAggregate S

child?: (%, %) -> Boolean if S has BasicType

from RecursiveAggregate S

children: % -> List %

from RecursiveAggregate S

coerce: % -> OutputForm if S has CoercibleTo OutputForm

from CoercibleTo OutputForm

copy: % -> %

from Aggregate

count: (S -> Boolean, %) -> NonNegativeInteger if % has finiteAggregate

from HomogeneousAggregate S

count: (S, %) -> NonNegativeInteger if % has finiteAggregate and S has BasicType

from HomogeneousAggregate S

cyclic?: % -> Boolean

from RecursiveAggregate S

distance: (%, %) -> Integer

from RecursiveAggregate S

elt: (%, left) -> %

elt(a, "left") (also written: a.left) is equivalent to left(a).

elt: (%, right) -> %

elt(a, "right") (also written: a.right) is equivalent to right(a).

elt: (%, value) -> S

from RecursiveAggregate S

empty?: % -> Boolean

from Aggregate

empty: () -> %

from Aggregate

eq?: (%, %) -> Boolean

from Aggregate

eval: (%, Equation S) -> % if S has SetCategory and S has Evalable S

from Evalable S

eval: (%, List Equation S) -> % if S has SetCategory and S has Evalable S

from Evalable S

eval: (%, List S, List S) -> % if S has SetCategory and S has Evalable S

from InnerEvalable(S, S)

eval: (%, S, S) -> % if S has SetCategory and S has Evalable S

from InnerEvalable(S, S)

every?: (S -> Boolean, %) -> Boolean if % has finiteAggregate

from HomogeneousAggregate S

hash: % -> SingleInteger if S has SetCategory

from SetCategory

hashUpdate!: (HashState, %) -> HashState if S has SetCategory

from SetCategory

latex: % -> String if S has SetCategory

from SetCategory

leaf?: % -> Boolean

from RecursiveAggregate S

leaves: % -> List S

from RecursiveAggregate S

left: % -> %

left(a) returns the left child.

less?: (%, NonNegativeInteger) -> Boolean

from Aggregate

map!: (S -> S, %) -> % if % has shallowlyMutable

from HomogeneousAggregate S

map: (S -> S, %) -> %

from HomogeneousAggregate S

max: % -> S if S has OrderedSet and % has finiteAggregate

from HomogeneousAggregate S

max: ((S, S) -> Boolean, %) -> S if % has finiteAggregate

from HomogeneousAggregate S

member?: (S, %) -> Boolean if % has finiteAggregate and S has BasicType

from HomogeneousAggregate S

members: % -> List S if % has finiteAggregate

from HomogeneousAggregate S

min: % -> S if S has OrderedSet and % has finiteAggregate

from HomogeneousAggregate S

more?: (%, NonNegativeInteger) -> Boolean

from Aggregate

node?: (%, %) -> Boolean if S has BasicType

from RecursiveAggregate S

nodes: % -> List %

from RecursiveAggregate S

parts: % -> List S if % has finiteAggregate

from HomogeneousAggregate S

right: % -> %

right(a) returns the right child.

sample: %

from Aggregate

setchildren!: (%, List %) -> % if % has shallowlyMutable

from RecursiveAggregate S

setelt!: (%, left, %) -> % if % has shallowlyMutable

setelt!(a, "left", b) (also written a.left := b) is equivalent to setleft!(a, b).

setelt!: (%, right, %) -> % if % has shallowlyMutable

setelt!(a, "right", b) (also written a.right := b) is equivalent to setright!(a, b).

setelt!: (%, value, S) -> S if % has shallowlyMutable

from RecursiveAggregate S

setleft!: (%, %) -> % if % has shallowlyMutable

setleft!(a, b) sets the left child of a to be b.

setright!: (%, %) -> % if % has shallowlyMutable

setright!(a, b) sets the right child of a to be b.

setvalue!: (%, S) -> S if % has shallowlyMutable

from RecursiveAggregate S

size?: (%, NonNegativeInteger) -> Boolean

from Aggregate

value: % -> S

from RecursiveAggregate S

Aggregate

BasicType if S has SetCategory or % has finiteAggregate and S has BasicType

CoercibleTo OutputForm if S has CoercibleTo OutputForm

Evalable S if S has SetCategory and S has Evalable S

HomogeneousAggregate S

InnerEvalable(S, S) if S has SetCategory and S has Evalable S

RecursiveAggregate S

SetCategory if S has SetCategory