I've now finished an initial draft of AA Tree Map and it passes
collection-check:
(deftest tests
(assert-map-like (create-aamap)
gen-element gen-element
; {:base (sorted-map) :ordered? true}
))
Unfortunately I had to comment
Fixed. I left out the n argument, which is not optional when specifying
options:
(deftest tests
(assert-map-like 100
(create-aamap)
gen-element gen-element
{:base (sorted-map) :ordered? true}))
Runs great. :-)
On Friday, September 4, 2015 at 2:29:49 PM UTC-4, William la Forge
Here's the link to the test
file: https://github.com/laforge49/aatree/blob/master/test/aatree/core_test.clj
On Friday, September 4, 2015 at 2:26:52 PM UTC-4, William la Forge wrote:
>
> I've now finished an initial draft of AA Tree Map and it passes
> collection-check:
>
>
> (deftest tests
>
Looking wildly useful. Many thanks!
On Monday, August 24, 2015 at 8:46:12 AM UTC-4, icamts wrote:
Not a pointer but this may help in testing your implementation:
https://github.com/ztellman/collection-check
Il giorno lunedì 10 agosto 2015 00:31:25 UTC+2, William la Forge ha
scritto:
Not a pointer but this may help in testing your implementation:
https://github.com/ztellman/collection-check
Il giorno lunedì 10 agosto 2015 00:31:25 UTC+2, William la Forge ha scritto:
I've done a lot with AA trees in the past, creating variations that are
immutable, durable (replacing
Thanks Andy.
PersistentTreeMap is a helpful source of ideas for me. For example, it
pointed me to the RT class which holds DefaultComparator. And before
looking at it I was not even aware of the sorted-set-by function in
Clojure. :-)
On Monday, August 10, 2015 at 3:25:43 PM UTC-4, Andy
Oh! The Java collection methods! For interop with Java, I'm guessing. Not a
personal priority, though I see that data.int-map does exactly that.
The Clojure interfaces are much more reasonable. And really I want to focus
on the extensions to AA trees that I've developed, like virtual AA trees
I had not heard of AA trees before, but according to Wikipedia they sound
like a variant of red-black trees. Clojure's built-in sorted-map and
sorted-set implementations are called by the class name PersistentTreeMap
in its Java implementation [1], and it implements a persistent version of a
I've done a lot with AA trees in the past, creating variations that are
immutable, durable (replacing b-trees) and versioned of vectors, maps and
sets.
I would like to migrate these ideas from Java to Clojure, while
implementing the interfaces appropriate for Clojure.
Still being very much a