From 0e699be281c8dea53e589e08a5831837e0eae7ea Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 7 Oct 2021 20:17:50 -0400 Subject: Updates for Chickadee 0.8.0 and Guile-SDL2 0.7.0. --- manuals/chickadee/Heaps.html | 139 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 manuals/chickadee/Heaps.html (limited to 'manuals/chickadee/Heaps.html') diff --git a/manuals/chickadee/Heaps.html b/manuals/chickadee/Heaps.html new file mode 100644 index 0000000..8aea793 --- /dev/null +++ b/manuals/chickadee/Heaps.html @@ -0,0 +1,139 @@ + + + + + + +Heaps (The Chickadee Game Toolkit) + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: Data Structures   [Contents][Index]

+
+
+

5.6.3 Heaps

+ +

The (chickadee data heap) module provides a binary heap data +structure. The heap orders data from smallest to largest, according +to a custom comparison predicate, making it a good choice for priority +queues. +

+
+
Procedure: make-heap [#:< <]
+

Return a new heap that uses the predicate < to determine order. +

+ +
+
Procedure: heap? obj
+

Return #t if obj is a heap. +

+ +
+
Procedure: heap-empty? heap
+

Return #t if heap is empty. +

+ +
+
Procedure: heap-size heap
+

Return the current size of heap. +

+ +
+
Procedure: heap-min heap
+

Return the minimum item in heap. +

+ +
+
Procedure: heap-insert! heap item
+

Add item to heap. +

+ +
+
Procedure: heap-remove! heap
+

Remove the minimum item in heap. +

+ +
+
Procedure: heap-clear! heap
+

Remove all items from heap. +

+ + + + + + -- cgit v1.2.3