diff --git a/extra/assoc-heaps/assoc-heaps-docs.factor b/extra/assoc-heaps/assoc-heaps-docs.factor deleted file mode 100644 index 475b337cf3..0000000000 --- a/extra/assoc-heaps/assoc-heaps-docs.factor +++ /dev/null @@ -1,34 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: help.markup help.syntax io.streams.string assocs -heaps.private ; -IN: assoc-heaps - -HELP: -{ $values { "assoc" assoc } { "heap" heap } { "assoc-heap" assoc-heap } } -{ $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ; - -HELP: -{ $values { "unique-heap" assoc-heap } } -{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a max-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ; - -HELP: -{ $values { "unique-heap" assoc-heap } } -{ $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a min-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ; - -{ } related-words - -HELP: assoc-heap -{ $description "A data structure containing an assoc and a heap to get certain properties with better time constraints at the expense of more space and complexity. For instance, a hashtable and a heap can be combined into one assoc-heap to get a sorted data structure with O(1) lookup. Operations on assoc-heap may update both the assoc and the heap or leave them out of sync if it's advantageous." } ; - -ARTICLE: "assoc-heaps" "Associative heaps" -"The " { $vocab-link "assoc-heaps" } " vocabulary combines exists to synthesize data structures with better time properties than either of the two component data structures alone." $nl -"Associative heap constructor:" -{ $subsections } -"Unique heaps:" -{ $subsections - - -} ; - -ABOUT: "assoc-heaps" diff --git a/extra/assoc-heaps/assoc-heaps-tests.factor b/extra/assoc-heaps/assoc-heaps-tests.factor deleted file mode 100644 index 22f70d5e5d..0000000000 --- a/extra/assoc-heaps/assoc-heaps-tests.factor +++ /dev/null @@ -1,11 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: assoc-heaps combinators heaps kernel tools.test ; - -{ { { 0 "zero" } { 1 "one" } { 2 "two" } } } [ - - "two" 2 pick heap-push - "zero" 0 pick heap-push - "one" 1 pick heap-push - heap-pop-all -] unit-test diff --git a/extra/assoc-heaps/assoc-heaps.factor b/extra/assoc-heaps/assoc-heaps.factor deleted file mode 100644 index af3fdfc325..0000000000 --- a/extra/assoc-heaps/assoc-heaps.factor +++ /dev/null @@ -1,29 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: accessors assocs hashtables heaps kernel ; -IN: assoc-heaps - -TUPLE: assoc-heap assoc heap ; - -C: assoc-heap - -: ( -- unique-heap ) - H{ } clone ; - -: ( -- unique-heap ) - H{ } clone ; - -M: assoc-heap heap-push* - pick over assoc>> key? [ - 3drop f - ] [ - [ assoc>> swapd set-at ] [ heap>> heap-push* ] 3bi - ] if ; - -M: assoc-heap heap-pop heap>> heap-pop ; - -M: assoc-heap heap-peek heap>> heap-peek ; - -M: assoc-heap heap-empty? heap>> heap-empty? ; - -M: assoc-heap heap-size heap>> heap-size ; diff --git a/extra/assoc-heaps/authors.txt b/extra/assoc-heaps/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/extra/assoc-heaps/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/extra/assoc-heaps/summary.txt b/extra/assoc-heaps/summary.txt deleted file mode 100644 index 792be0a9ec..0000000000 --- a/extra/assoc-heaps/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Priority queue with fast insertion, removal of first element, and lookup of arbitrary elements by key diff --git a/extra/assoc-heaps/tags.txt b/extra/assoc-heaps/tags.txt deleted file mode 100644 index 42d711b32b..0000000000 --- a/extra/assoc-heaps/tags.txt +++ /dev/null @@ -1 +0,0 @@ -collections