-
Notifications
You must be signed in to change notification settings - Fork 0
Heap
Dickson Law edited this page Apr 12, 2023
·
3 revisions
A data structure that stores value-priority pairs and is optimized to access entries at the minimum and maximum priorities. Comparable to DS Priority Queues.
Note: This implementation does not place any guarantees on ordering for values of equal priority.
-
add(...): Seeds_priority_add(id, val, priority). -
changePriority(...): Seeds_priority_change_priority(id, val, priority). -
clear(): Seeds_priority_clear(id). -
copy(sourceHeap): Seeds_priority_copy(id, source). -
deleteMax(): Seeds_priority_delete_max(id). -
deleteMin(): Seeds_priority_delete_min(id). -
deleteValue(): Seeds_priority_delete_value(id). -
empty(): Seeds_priority_empty(id). -
findMax(): Seeds_priority_find_max(id). -
findMin(): Seeds_priority_find_min(id). -
findPriority(priority): Seeds_priority_find_priority(id, priority). -
read(datastr): Seeds_priority_read(id, str). -
size(): Seeds_priority_size(id). -
write(): Seeds_priority_write(id).
-
getMin(): Same asfindMin(). -
getMax(): Same asfindMax().
-
clone(): Return a shallow clone of the heap. -
cloneDeep(): Same asclone(), but also making deep copies of everything in the heap. -
copyDeep(sourceHeap): Same ascopy(sourceHeap), but with deep copies of everything in the source.