[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/heap ceb5dd1 21/31: Trivial whitespace tidying.
From: |
Stefan Monnier |
Subject: |
[elpa] externals/heap ceb5dd1 21/31: Trivial whitespace tidying. |
Date: |
Mon, 14 Dec 2020 12:13:37 -0500 (EST) |
branch: externals/heap
commit ceb5dd14ac8de2f2538b47e27a85bc084d2e9584
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Trivial whitespace tidying.
---
heap.el | 86 ++++++++++++++++++++++++++++++-----------------------------------
1 file changed, 39 insertions(+), 47 deletions(-)
diff --git a/heap.el b/heap.el
index 72b9fd6..a962a00 100644
--- a/heap.el
+++ b/heap.el
@@ -1,4 +1,3 @@
-
;;; heap.el --- heap (a.k.a. priority queue) data structures
@@ -8,58 +7,55 @@
;; Version: 0.3
;; Keywords: extensions, data structures, heap, priority queue
;; URL: http://www.dr-qubit.org/emacs.php
-
+;; Repository: http://www.dr-qubit.org/git/predictive.git
;; This file is part of Emacs.
;;
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
+;; GNU Emacs is free software: you can redistribute it and/or modify it under
+;; the terms of the GNU General Public License as published by the Free
+;; Software Foundation, either version 3 of the License, or (at your option)
+;; any later version.
;;
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
+;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT
+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+;; more details.
;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+;; You should have received a copy of the GNU General Public License along
+;; with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
-;; A heap is a form of efficient self-sorting tree. In particular, the
-;; root node is guaranteed to be the highest-ranked entry in the
-;; tree. (The comparison function used for ranking the data can, of
-;; course, be freely defined). Therefore repeatedly removing the root
-;; node will return the data in order of increasing rank. They are often
-;; used as priority queues, for scheduling tasks in order of importance.
+;; A heap is a form of efficient self-sorting tree. In particular, the root
+;; node is guaranteed to be the highest-ranked entry in the tree. (The
+;; comparison function used for ranking the data can, of course, be freely
+;; defined). Therefore repeatedly removing the root node will return the data
+;; in order of increasing rank. They are often used as priority queues, for
+;; scheduling tasks in order of importance.
;;
;; This package implements ternary heaps, since they are about 12% more
;; efficient than binary heaps for heaps containing more than about 10
;; elements, and for very small heaps the difference is negligible. The
;; asymptotic complexity of ternary heap operations is the same as for a
-;; binary heap: 'add', 'delete-root' and 'modify' operations are all
-;; O(log n) on a heap containing n elements.
+;; binary heap: 'add', 'delete-root' and 'modify' operations are all O(log n)
+;; on a heap containing n elements.
;;
-;; Note that this package implements a heap as an implicit data
-;; structure on a vector. Therefore, the maximum size of the heap has to
-;; be specified in advance. Although the heap will grow dynamically if
-;; it becomes full, this requires copying the entire heap, so insertion
-;; has worst-case complexity O(n) instead of O(log n), though the
-;; amortized complexity is still O(n). (For applications where the
-;; maximum size of the heap is not known in advance, an implementation
-;; based on binary trees might be more suitable, but is not currently
-;; implemented in this package.)
-;;
-;; You create a heap using `make-heap', add elements to it using
-;; `heap-add', delete and return the root of the heap using
-;; `heap-delete-root', and modify an element of the heap using
-;; `heap-modify'. A number of other heap convenience functions are also
-;; provided, all with the prefix `heap-'. Functions with prefix `heap--'
-;; are for internal use only, and should never be used outside this
-;; package.
+;; Note that this package implements a heap as an implicit data structure on a
+;; vector. Therefore, the maximum size of the heap has to be specified in
+;; advance. Although the heap will grow dynamically if it becomes full, this
+;; requires copying the entire heap, so insertion has worst-case complexity
+;; O(n) instead of O(log n), though the amortized complexity is still
+;; O(n). (For applications where the maximum size of the heap is not known in
+;; advance, an implementation based on binary trees might be more suitable,
+;; but is not currently implemented in this package.)
;;
+;; You create a heap using `make-heap', add elements to it using `heap-add',
+;; delete and return the root of the heap using `heap-delete-root', and modify
+;; an element of the heap using `heap-modify'. A number of other heap
+;; convenience functions are also provided, all with the prefix
+;; `heap-'. Functions with prefix `heap--' are for internal use only, and
+;; should never be used outside this package.
;;; Change Log:
@@ -67,10 +63,10 @@
;; Version 0.3
;; * converted heap data structures into defstructs
;; * increased default resize-factor to 2
-;; * added `heap-build' function for efficiently building a heap out of
-;; a vector
-;; * added `heap-merge' function for merging heaps (not very efficient
-;; for binary -- or ternary -- heaps, only O(n))
+;; * added `heap-build' function for efficiently building a heap out of a
+;; vector
+;; * added `heap-merge' function for merging heaps (not very efficient for
+;; binary -- or ternary -- heaps, only O(n))
;;
;; Version 0.2.2
;; * fixed bug in `heap-copy'
@@ -79,8 +75,8 @@
;; * modified Commentary
;;
;; Version 0.2
-;; * fixed efficiency issue: vectors are no longer copied all the time
-;; (thanks to Stefan Monnier for pointing this out)
+;; * fixed efficiency issue: vectors are no longer copied all the time (thanks
+;; to Stefan Monnier for pointing this out)
;;
;; Version 0.1.5
;; * renamed `vswap' to `heap--vswap'
@@ -346,8 +342,4 @@ not very efficient, taking O(n) time for combined heap size
n\)."
(provide 'heap)
-;;; Local Variables:
-;;; fill-column: 72
-;;; End:
-
;;; heap.el ends here
- [elpa] branch externals/heap created (now 32e75bb), Stefan Monnier, 2020/12/14
- [elpa] externals/heap 37bc0e9 05/31: Version 0.10 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 03a876d 02/31: Version 0.2 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap ceb5dd1 21/31: Trivial whitespace tidying.,
Stefan Monnier <=
- [elpa] externals/heap 17429ee 07/31: Version 0.12 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 55d47fd 11/31: Fixed ancient but overlooked bug in heap resizing in heap-add., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 9bcd8d3 16/31: Added heap-build function for efficiently building a heap out of a vector., Stefan Monnier, 2020/12/14
- [elpa] externals/heap ed90e4d 09/31: Adding missing 'buffer setting to customization menu for predictive-auto-add-to-dict., Stefan Monnier, 2020/12/14
- [elpa] externals/heap f74c766 15/31: Converted heap data structures to defstructs., Stefan Monnier, 2020/12/14
- [elpa] externals/heap e354b4f 19/31: Revert default heap size to 10., Stefan Monnier, 2020/12/14
- [elpa] externals/heap e2c16be 06/31: Version 0.10.3 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 75b42f4 04/31: Version 0.9.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 2d51c84 01/31: Version 0.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/heap 227de61 03/31: Version 0.7 of the predictive completion package., Stefan Monnier, 2020/12/14