John Benediktsson
d29052c7b9
heaps: simplify code a little, use locals to expose heap-delete logic.
2019-01-10 16:44:22 -08:00
Jon Harper
be24351a29
heaps.tests: remove dead code
2019-01-10 21:37:28 +01:00
Jon Harper
8a052aed92
heaps: check heap invariant during tests
2019-01-10 21:37:27 +01:00
Samuel Tardieu
2cfa457258
Fix bugs in heap-delete
...
When an entry is kept to be use later with `heap-delete`, its `index`
in the owning heap is automatically updated as the entry sifts up
or down.
However, if the entry is removed from the heap via either a `heap-pop`
or a `heap-delete` operation, its index is not invalidated and
the entry can still be used later with `heap-delete` and remove the
wrong element from the heap.
This patch invalidates entries when they leave the heap by setting
their index to `f`, and check the index in `entry>index`.
2019-01-04 07:27:28 -08:00
Doug Coleman
e189954ecc
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota-tuple ... ;
2017-06-02 11:57:05 -05:00
Doug Coleman
43d6f1d3e2
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
2015-07-02 17:28:17 -07:00
Doug Coleman
59f3b1ea57
Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
...
Needs a bit more work.
This reverts commit 7e54cc2824
.
2015-07-02 13:47:06 -07:00
Doug Coleman
7e54cc2824
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
2015-07-02 11:36:08 -07:00
Doug Coleman
250d96d7b1
Clean up heaps implementation, test max-heaps.
2011-04-10 12:57:39 -05:00
Slava Pestov
df4fb4a3ee
Removing integers-as-sequences
2010-01-15 07:15:33 +13:00
Joe Groff
7c5ef08aab
[ [ ... ] compare ] sort => [ ... ] sort-with
2009-08-02 20:09:23 -05:00
Doug Coleman
364ea217ef
fix more compiler errors
2009-04-17 14:44:08 -05:00
Slava Pestov
2dc0757850
Cleanups
2009-01-21 19:55:47 -06:00
Slava Pestov
34792a9f23
Remove >r/r>
2008-12-17 19:17:37 -06:00
Doug Coleman
efb5fa0814
don't redefine delete-random
2008-10-04 11:45:21 -05:00
Slava Pestov
c19f2257f4
Fix permission bits
2008-10-02 08:34:49 -05:00
Doug Coleman
e81d69ab34
new accessors
2008-08-29 17:07:30 -05:00
Doug Coleman
085e477a98
new accessors
2008-08-29 16:49:41 -05:00
Slava Pestov
d66f887736
Create basis vocab root
2008-07-28 22:03:13 -05:00