next node: BSTreeIndex,
prev node: BSTreeConv,
up to node: Subsystem Balanced Search Trees


BSTreeFilter

This structure contains functions for pruning trees by a predicate.

Signature of BSTreeFilter

List of Import References :
See BOOL
See BSTree
See DENOTATION
See Nat
See Option
See Pair
See Seq
See Tree

SIGNATURE BSTreeFilter[data, <]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

IMPORT BSTree[data, <] ONLY bstree[data, <]

Parameter

SORT data
FUN < : data ** data -> bool

Filtering a Tree from the Root

take(P, t) removes all subtrees from t whose values do not fulfill P.

FUN take: (data -> bool) ** bstree -> bstree

Filtering a Tree from the Leaves

drop removes the leaves which do fulfill the given predicate. dropall does this repeatedly.

FUN drop: (data -> bool) ** bstree -> bstree
FUN dropall: (data -> bool) ** bstree -> bstree


next node: BSTreeIndex,
prev node: BSTreeConv,
up to node: Subsystem Balanced Search Trees