BinaryTournament(S)
tree.spad line 278
[edit on github]
BinaryTournament(S) is the domain of binary trees where elements are ordered down the tree. A binary tournament is either empty or is a node containing a value of type S
, and a left and a right which are both BinaryTree(S)
- # : % -> NonNegativeInteger
- from Aggregate
- = : (%, %) -> Boolean
- from BasicType
- any? : (Mapping(Boolean, S), %) -> Boolean
- from HomogeneousAggregate(S)
- binaryTournament : List(S) -> %
binaryTournament(ls)
creates a binary tournament with the elements of ls
as values of the nodes.
- child? : (%, %) -> Boolean
- from RecursiveAggregate(S)
- children : % -> List(%)
- from RecursiveAggregate(S)
- coerce : % -> OutputForm
- from CoercibleTo(OutputForm)
- copy : % -> %
- from Aggregate
- count : (S, %) -> NonNegativeInteger
- from HomogeneousAggregate(S)
- count : (Mapping(Boolean, S), %) -> NonNegativeInteger
- from HomogeneousAggregate(S)
- cyclic? : % -> Boolean
- from RecursiveAggregate(S)
- distance : (%, %) -> Integer
- from RecursiveAggregate(S)
- elt : (%, "left") -> %
- from BinaryRecursiveAggregate(S)
- elt : (%, "right") -> %
- from BinaryRecursiveAggregate(S)
- elt : (%, "value") -> S
- from RecursiveAggregate(S)
- empty : () -> %
- from Aggregate
- empty? : % -> Boolean
- from Aggregate
- eq? : (%, %) -> Boolean
- from Aggregate
- eval : (%, S, S) -> % if S has Evalable(S)
- from InnerEvalable(S, S)
- eval : (%, 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 : (%, List(Equation(S))) -> % if S has Evalable(S)
- from Evalable(S)
- every? : (Mapping(Boolean, S), %) -> Boolean
- from HomogeneousAggregate(S)
- hash : % -> SingleInteger if S has Hashable
- from Hashable
- hashUpdate! : (HashState, %) -> HashState if S has Hashable
- from Hashable
- insert! : (S, %) -> %
insert!(x, b)
inserts element x
as a leave into binary tournament b
.
- latex : % -> String
- from SetCategory
- leaf? : % -> Boolean
- from RecursiveAggregate(S)
- leaves : % -> List(S)
- from RecursiveAggregate(S)
- left : % -> %
- from BinaryRecursiveAggregate(S)
- less? : (%, NonNegativeInteger) -> Boolean
- from Aggregate
- map : (Mapping(S, S), %) -> %
- from HomogeneousAggregate(S)
- map! : (Mapping(S, S), %) -> %
- from HomogeneousAggregate(S)
- max : % -> S
- from HomogeneousAggregate(S)
- max : (Mapping(Boolean, S, S), %) -> S
- from HomogeneousAggregate(S)
- member? : (S, %) -> Boolean
- from HomogeneousAggregate(S)
- members : % -> List(S)
- from HomogeneousAggregate(S)
- min : % -> S
- from HomogeneousAggregate(S)
- more? : (%, NonNegativeInteger) -> Boolean
- from Aggregate
- node : (%, S, %) -> %
- from BinaryTreeCategory(S)
- node? : (%, %) -> Boolean
- from RecursiveAggregate(S)
- nodes : % -> List(%)
- from RecursiveAggregate(S)
- parts : % -> List(S)
- from HomogeneousAggregate(S)
- right : % -> %
- from BinaryRecursiveAggregate(S)
- sample : () -> %
- from Aggregate
- setchildren! : (%, List(%)) -> %
- from RecursiveAggregate(S)
- setelt! : (%, "left", %) -> %
- from BinaryRecursiveAggregate(S)
- setelt! : (%, "right", %) -> %
- from BinaryRecursiveAggregate(S)
- setelt! : (%, "value", S) -> S
- from RecursiveAggregate(S)
- setleft! : (%, %) -> %
- from BinaryRecursiveAggregate(S)
- setright! : (%, %) -> %
- from BinaryRecursiveAggregate(S)
- setvalue! : (%, S) -> S
- from RecursiveAggregate(S)
- size? : (%, NonNegativeInteger) -> Boolean
- from Aggregate
- value : % -> S
- from RecursiveAggregate(S)
- ~= : (%, %) -> Boolean
- from BasicType
BinaryRecursiveAggregate(S)
BasicType
RecursiveAggregate(S)
shallowlyMutable
HomogeneousAggregate(S)
CoercibleTo(OutputForm)
SetCategory
Hashable
BinaryTreeCategory(S)
finiteAggregate
InnerEvalable(S, S)
Aggregate
Evalable(S)