Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add key= argument to heapq.nsmallest() and heapq.nlargest(). | Raymond Hettinger | 2004-12-02 | 1 | -1/+7 |
| | |||||
* | Fix argument order in pure python version of nsmallest() and nlargest(). | Raymond Hettinger | 2004-11-29 | 1 | -2/+5 |
| | |||||
* | Plug a leak and beef-up test coverage. | Raymond Hettinger | 2004-09-28 | 1 | -0/+149 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2004-07-08 | 1 | -1/+0 |
| | |||||
* | Exercise some error conditions | Neal Norwitz | 2004-07-08 | 1 | -0/+10 |
| | |||||
* | Reverse argument order for nsmallest() and nlargest(). | Raymond Hettinger | 2004-06-15 | 1 | -4/+4 |
| | | | | Reads better when the iterable is a generator expression. | ||||
* | Install C version of heapq.nsmallest(). | Raymond Hettinger | 2004-06-13 | 1 | -6/+19 |
| | |||||
* | Improve the memory performance and speed of heapq.nsmallest() by using | Raymond Hettinger | 2004-06-12 | 1 | -0/+1 |
| | | | | | an alternate algorithm when the number of selected items is small relative to the full iterable. | ||||
* | Convert test_heapq.py to unittests. | Raymond Hettinger | 2004-06-10 | 1 | -86/+90 |
| | |||||
* | SF patch #969791: Add nlargest() and nsmallest() to heapq. | Raymond Hettinger | 2004-06-10 | 1 | -1/+10 |
| | |||||
* | Add another test which exercises the whole suite with a | Raymond Hettinger | 2002-12-07 | 1 | -0/+14 |
| | | | | heapsort and verifies the result against list.sort(). | ||||
* | Added new heapreplace(heap, item) function, to pop (and return) the | Tim Peters | 2002-08-03 | 1 | -3/+2 |
| | | | | | currently-smallest value, and add item, in one gulp. See the second N-Best algorithm in the test suite for a natural use. | ||||
* | Minor fiddling, including a simple class to implement a heap iterator | Tim Peters | 2002-08-03 | 1 | -5/+18 |
| | | | | | in the test file. I have docs for heapq.heapify ready to check in, but Jack appears to have left behind a stale lock in the Doc/lib directory. | ||||
* | Hmm! I thought I checked this in before! Oh well. | Tim Peters | 2002-08-02 | 1 | -1/+19 |
| | | | | | | | | | | | | Added new heapify() function, which transforms an arbitrary list into a heap in linear time; that's a fundamental tool for using heaps in real life <wink>. Added heapyify() test. Added a "less naive" N-best algorithm to the test suite, and noted that this could actually go much faster (building on heapify()) if we had max-heaps instead of min-heaps (the iterative method is appropriate when all the data isn't known in advance, but when it is known in advance the tradeoffs get murkier). | ||||
* | check_invariant(): Use the same child->parent "formula" used by heapq.py. | Tim Peters | 2002-08-02 | 1 | -2/+2 |
| | |||||
* | Don't use true division where int division was intended. For that matter, | Tim Peters | 2002-08-02 | 1 | -1/+1 |
| | | | | don't use division at all. | ||||
* | Adding the heap queue algorithm, per discussion in python-dev last | Guido van Rossum | 2002-08-02 | 1 | -0/+48 |
week. |