Handbook
Glossary
branch
Vocabulary
persistent.heaps.private
Definition
IN:
persistent.heaps.private
TUPLE:
branch
value prio left right
;
Methods
USING:
accessors
kernel
persistent.heaps
persistent.heaps.private
;
M:
branch
pheap-peek
[
value>>
]
[
prio>>
]
bi
;
USING:
accessors
kernel
math
persistent.heaps
persistent.heaps.private
;
M:
branch
pheap-push
2dup
prio>>
<=
[
push-top
]
[
push-in
]
if
;
USING:
accessors
kernel
math
persistent.heaps.private
;
M:
branch
sift-down
3dup
[
prio>>
<=
]
both-with?
[
<branch>
]
[
2dup
[
prio>>
]
bi@
<=
[
reroot-left
]
[
reroot-right
]
if
]
if
;