next node: HeapIndex,
prev node: HeapConv,
up to node: Subsystem Heaps


HeapFilter

This structure contains functions for pruning heaps by a predicate.

Signature of HeapFilter

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

Parameter

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

Filtering a Heap from the Root

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

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

Filtering a Heap from the Leaves

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