This structure contains functions for pruning heaps by a predicate.
List of Import References :
See BOOL
See DENOTATION
See Heap
See Nat
See Option
See Seq
See Tree
SIGNATURE HeapFilter[data, <]
$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)
IMPORT Heap[data, <] ONLY heap
SORT data FUN < : data ** data -> bool
take(P, t)
removes all subheaps from t
whose values
do not fulfill P
.
FUN take: (data -> bool) ** heap -> heap
drop
removes the leaves which do fulfill the given
predicate. dropall
does this repeatedly.
FUN drop: (data -> bool) ** heap -> heap FUN dropall: (data -> bool) ** heap -> heap
next node: HeapIndex,
prev node: HeapConv,
up to node: Subsystem Heaps