Re: some guidance sought
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 out the test against sorted-map. I was getting this error: ERROR in (tests) (generators.clj:366) Uncaught exception, not in assertion. expected: nil actual: java.lang.AssertionError: Assert failed: Args to tuple must be generators (every? generator? generators) at clojure.test.check.generators$tuple.doInvoke (generators.clj:366) clojure.lang.RestFn.invoke (RestFn.java:421) collection_check$gen_meta.invoke (collection_check.clj:30) collection_check$gen_map_actions.invoke (collection_check.clj:91) collection_check$assert_map_like.invoke (collection_check.clj:306) collection_check$assert_map_like.invoke (collection_check.clj:299) aatree.core_test/fn (core_test.clj:36) clojure.test$test_var$fn__7670.invoke (test.clj:704) clojure.test$test_var.invoke (test.clj:704) clojure.test$test_vars$fn__7692$fn__7697.invoke (test.clj:722) clojure.test$default_fixture.invoke (test.clj:674) clojure.test$test_vars$fn__7692.invoke (test.clj:722) clojure.test$default_fixture.invoke (test.clj:674) clojure.test$test_vars.invoke (test.clj:718) clojure.test$test_all_vars.invoke (test.clj:728) clojure.test$test_ns.invoke (test.clj:747) clojure.core$map$fn__4553.invoke (core.clj:2624) clojure.lang.LazySeq.sval (LazySeq.java:40) clojure.lang.LazySeq.seq (LazySeq.java:49) clojure.lang.Cons.next (Cons.java:39) clojure.lang.RT.boundedLength (RT.java:1735) clojure.lang.RestFn.applyTo (RestFn.java:130) clojure.core$apply.invoke (core.clj:632) clojure.test$run_tests.doInvoke (test.clj:762) clojure.lang.RestFn.applyTo (RestFn.java:137) clojure.core$apply.invoke (core.clj:630) user$eval85$fn__140$fn__171.invoke (form-init7529748499207850099.clj:1) user$eval85$fn__140$fn__141.invoke (form-init7529748499207850099.clj:1) user$eval85$fn__140.invoke (form-init7529748499207850099.clj:1) user$eval85.invoke (form-init7529748499207850099.clj:1) clojure.lang.Compiler.eval (Compiler.java:6782) clojure.lang.Compiler.eval (Compiler.java:6772) clojure.lang.Compiler.load (Compiler.java:7227) clojure.lang.Compiler.loadFile (Compiler.java:7165) clojure.main$load_script.invoke (main.clj:275) clojure.main$init_opt.invoke (main.clj:280) clojure.main$initialize.invoke (main.clj:308) clojure.main$null_opt.invoke (main.clj:343) clojure.main$main.doInvoke (main.clj:421) clojure.lang.RestFn.invoke (RestFn.java:421) clojure.lang.Var.invoke (Var.java:383) clojure.lang.AFn.applyToHelper (AFn.java:156) clojure.lang.Var.applyTo (Var.java:700) clojure.main.main (main.java:37) Any suggestions? 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: >> >> 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 newbie, I'd appreciate some pointers, relevant >> docs and/or examples. >> >> Thanks! >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: some guidance sought
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 wrote: > > 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 >> (assert-map-like (create-aamap) >>gen-element gen-element >>; {:base (sorted-map) :ordered? true} >>)) >> >> >> Unfortunately I had to comment out the test against sorted-map. I was >> getting this error: >> >> ERROR in (tests) (generators.clj:366) >> Uncaught exception, not in assertion. >> expected: nil >> actual: java.lang.AssertionError: Assert failed: Args to tuple must be >> generators >> (every? generator? generators) >> at clojure.test.check.generators$tuple.doInvoke (generators.clj:366) >> clojure.lang.RestFn.invoke (RestFn.java:421) >> collection_check$gen_meta.invoke (collection_check.clj:30) >> collection_check$gen_map_actions.invoke (collection_check.clj:91) >> collection_check$assert_map_like.invoke (collection_check.clj:306) >> collection_check$assert_map_like.invoke (collection_check.clj:299) >> aatree.core_test/fn (core_test.clj:36) >> clojure.test$test_var$fn__7670.invoke (test.clj:704) >> clojure.test$test_var.invoke (test.clj:704) >> clojure.test$test_vars$fn__7692$fn__7697.invoke (test.clj:722) >> clojure.test$default_fixture.invoke (test.clj:674) >> clojure.test$test_vars$fn__7692.invoke (test.clj:722) >> clojure.test$default_fixture.invoke (test.clj:674) >> clojure.test$test_vars.invoke (test.clj:718) >> clojure.test$test_all_vars.invoke (test.clj:728) >> clojure.test$test_ns.invoke (test.clj:747) >> clojure.core$map$fn__4553.invoke (core.clj:2624) >> clojure.lang.LazySeq.sval (LazySeq.java:40) >> clojure.lang.LazySeq.seq (LazySeq.java:49) >> clojure.lang.Cons.next (Cons.java:39) >> clojure.lang.RT.boundedLength (RT.java:1735) >> clojure.lang.RestFn.applyTo (RestFn.java:130) >> clojure.core$apply.invoke (core.clj:632) >> clojure.test$run_tests.doInvoke (test.clj:762) >> clojure.lang.RestFn.applyTo (RestFn.java:137) >> clojure.core$apply.invoke (core.clj:630) >> user$eval85$fn__140$fn__171.invoke >> (form-init7529748499207850099.clj:1) >> user$eval85$fn__140$fn__141.invoke >> (form-init7529748499207850099.clj:1) >> user$eval85$fn__140.invoke (form-init7529748499207850099.clj:1) >> user$eval85.invoke (form-init7529748499207850099.clj:1) >> clojure.lang.Compiler.eval (Compiler.java:6782) >> clojure.lang.Compiler.eval (Compiler.java:6772) >> clojure.lang.Compiler.load (Compiler.java:7227) >> clojure.lang.Compiler.loadFile (Compiler.java:7165) >> clojure.main$load_script.invoke (main.clj:275) >> clojure.main$init_opt.invoke (main.clj:280) >> clojure.main$initialize.invoke (main.clj:308) >> clojure.main$null_opt.invoke (main.clj:343) >> clojure.main$main.doInvoke (main.clj:421) >> clojure.lang.RestFn.invoke (RestFn.java:421) >> clojure.lang.Var.invoke (Var.java:383) >> clojure.lang.AFn.applyToHelper (AFn.java:156) >> clojure.lang.Var.applyTo (Var.java:700) >> clojure.main.main (main.java:37) >> >> Any suggestions? >> >> 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: 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! >>> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to
Re: some guidance sought
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 > (assert-map-like (create-aamap) >gen-element gen-element >; {:base (sorted-map) :ordered? true} >)) > > > Unfortunately I had to comment out the test against sorted-map. I was > getting this error: > > ERROR in (tests) (generators.clj:366) > Uncaught exception, not in assertion. > expected: nil > actual: java.lang.AssertionError: Assert failed: Args to tuple must be > generators > (every? generator? generators) > at clojure.test.check.generators$tuple.doInvoke (generators.clj:366) > clojure.lang.RestFn.invoke (RestFn.java:421) > collection_check$gen_meta.invoke (collection_check.clj:30) > collection_check$gen_map_actions.invoke (collection_check.clj:91) > collection_check$assert_map_like.invoke (collection_check.clj:306) > collection_check$assert_map_like.invoke (collection_check.clj:299) > aatree.core_test/fn (core_test.clj:36) > clojure.test$test_var$fn__7670.invoke (test.clj:704) > clojure.test$test_var.invoke (test.clj:704) > clojure.test$test_vars$fn__7692$fn__7697.invoke (test.clj:722) > clojure.test$default_fixture.invoke (test.clj:674) > clojure.test$test_vars$fn__7692.invoke (test.clj:722) > clojure.test$default_fixture.invoke (test.clj:674) > clojure.test$test_vars.invoke (test.clj:718) > clojure.test$test_all_vars.invoke (test.clj:728) > clojure.test$test_ns.invoke (test.clj:747) > clojure.core$map$fn__4553.invoke (core.clj:2624) > clojure.lang.LazySeq.sval (LazySeq.java:40) > clojure.lang.LazySeq.seq (LazySeq.java:49) > clojure.lang.Cons.next (Cons.java:39) > clojure.lang.RT.boundedLength (RT.java:1735) > clojure.lang.RestFn.applyTo (RestFn.java:130) > clojure.core$apply.invoke (core.clj:632) > clojure.test$run_tests.doInvoke (test.clj:762) > clojure.lang.RestFn.applyTo (RestFn.java:137) > clojure.core$apply.invoke (core.clj:630) > user$eval85$fn__140$fn__171.invoke (form-init7529748499207850099.clj:1) > user$eval85$fn__140$fn__141.invoke (form-init7529748499207850099.clj:1) > user$eval85$fn__140.invoke (form-init7529748499207850099.clj:1) > user$eval85.invoke (form-init7529748499207850099.clj:1) > clojure.lang.Compiler.eval (Compiler.java:6782) > clojure.lang.Compiler.eval (Compiler.java:6772) > clojure.lang.Compiler.load (Compiler.java:7227) > clojure.lang.Compiler.loadFile (Compiler.java:7165) > clojure.main$load_script.invoke (main.clj:275) > clojure.main$init_opt.invoke (main.clj:280) > clojure.main$initialize.invoke (main.clj:308) > clojure.main$null_opt.invoke (main.clj:343) > clojure.main$main.doInvoke (main.clj:421) > clojure.lang.RestFn.invoke (RestFn.java:421) > clojure.lang.Var.invoke (Var.java:383) > clojure.lang.AFn.applyToHelper (AFn.java:156) > clojure.lang.Var.applyTo (Var.java:700) > clojure.main.main (main.java:37) > > Any suggestions? > > 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: >>> >>> 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 newbie, I'd appreciate some pointers, relevant >>> docs and/or examples. >>> >>> Thanks! >>> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: some guidance sought
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: 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: some guidance sought
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 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: some guidance sought
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 Fingerhut wrote: 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 red-black tree. The source code won't give you lots of hand-holding, but it is there to see if you are interested. Andy [1] https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentTreeMap.java On Mon, Aug 10, 2015 at 11:56 AM, William la Forge lafo...@gmail.com javascript: wrote: 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 that can be used in place of a B-tree. Many thanks for the links. Plenty here for me to dig through. And as a newbie I've got to do a lot of reading if I ever want to write readable code. On Monday, August 10, 2015 at 7:29:26 AM UTC-4, Linus Ericsson wrote: The clojure core datastructures PersistentHashMap and PersistentVector are based on Philip Bagwells Ideal Hash Trees: http://lampwww.epfl.ch/papers/idealhashtrees.pdf Several of Chris Okasakis Purely Functional Datastructures are implemented already. http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf Clojure Toolbox http://www.clojure-toolbox.com/ mentions - Merkle https://github.com/aphyr/merkle - clj-tuple https://github.com/ztellman/clj-tuple - core.rrb-vector https://github.com/clojure/core.rrb-vector - data.finger-tree https://github.com/clojure/data.finger-tree - data.int-map https://github.com/clojure/data.int-map - data.priority-map https://github.com/clojure/data.priority-map - data.union-find https://github.com/jordanlewis/data.union-find - fast-zip https://github.com/akhudek/fast-zip - immutable-bitset https://github.com/ztellman/immutable-bitset - ordered https://github.com/flatland/ordered - ring-buffer https://github.com/amalloy/ring-buffer under Datastructures. Monads has been implemented many times, check https://github.com/clojure/algo.monads for one example. Mary Rose Cook wrote an impressive as well as entertaining article on implementing Fibonacci Heaps in Clojure http://maryrosecook.com/blog/post/the-fibonacci-heap-ruins-my-life Sketchy datastructures exists, https://github.com/bigmlcom/sketchy (bloom, hyperloglog, min-distance hashing etc). Another Bloom Filter: https://github.com/kyleburton/clj-bloom It is said that splay trees aren't very suitable for implementing as an immutable structure because they mutate on read. I guess you'll get quite exact guidelines in the various core libraries on how to implement the Java collection methods (in general, all mutating methods throw methodNotImplementedExceptions). Good luck! /Linus On Monday, August 10, 2015 at 12:31:25 AM UTC+2, William la Forge wrote: 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this
Re: some guidance sought
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 that can be used in place of a B-tree. Many thanks for the links. Plenty here for me to dig through. And as a newbie I've got to do a lot of reading if I ever want to write readable code. On Monday, August 10, 2015 at 7:29:26 AM UTC-4, Linus Ericsson wrote: The clojure core datastructures PersistentHashMap and PersistentVector are based on Philip Bagwells Ideal Hash Trees: http://lampwww.epfl.ch/papers/idealhashtrees.pdf Several of Chris Okasakis Purely Functional Datastructures are implemented already. http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf Clojure Toolbox http://www.clojure-toolbox.com/ mentions - Merkle https://github.com/aphyr/merkle - clj-tuple https://github.com/ztellman/clj-tuple - core.rrb-vector https://github.com/clojure/core.rrb-vector - data.finger-tree https://github.com/clojure/data.finger-tree - data.int-map https://github.com/clojure/data.int-map - data.priority-map https://github.com/clojure/data.priority-map - data.union-find https://github.com/jordanlewis/data.union-find - fast-zip https://github.com/akhudek/fast-zip - immutable-bitset https://github.com/ztellman/immutable-bitset - ordered https://github.com/flatland/ordered - ring-buffer https://github.com/amalloy/ring-buffer under Datastructures. Monads has been implemented many times, check https://github.com/clojure/algo.monads for one example. Mary Rose Cook wrote an impressive as well as entertaining article on implementing Fibonacci Heaps in Clojure http://maryrosecook.com/blog/post/the-fibonacci-heap-ruins-my-life Sketchy datastructures exists, https://github.com/bigmlcom/sketchy (bloom, hyperloglog, min-distance hashing etc). Another Bloom Filter: https://github.com/kyleburton/clj-bloom It is said that splay trees aren't very suitable for implementing as an immutable structure because they mutate on read. I guess you'll get quite exact guidelines in the various core libraries on how to implement the Java collection methods (in general, all mutating methods throw methodNotImplementedExceptions). Good luck! /Linus On Monday, August 10, 2015 at 12:31:25 AM UTC+2, William la Forge wrote: 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: some guidance sought
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 red-black tree. The source code won't give you lots of hand-holding, but it is there to see if you are interested. Andy [1] https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentTreeMap.java On Mon, Aug 10, 2015 at 11:56 AM, William la Forge laforg...@gmail.com wrote: 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 that can be used in place of a B-tree. Many thanks for the links. Plenty here for me to dig through. And as a newbie I've got to do a lot of reading if I ever want to write readable code. On Monday, August 10, 2015 at 7:29:26 AM UTC-4, Linus Ericsson wrote: The clojure core datastructures PersistentHashMap and PersistentVector are based on Philip Bagwells Ideal Hash Trees: http://lampwww.epfl.ch/papers/idealhashtrees.pdf Several of Chris Okasakis Purely Functional Datastructures are implemented already. http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf Clojure Toolbox http://www.clojure-toolbox.com/ mentions - Merkle https://github.com/aphyr/merkle - clj-tuple https://github.com/ztellman/clj-tuple - core.rrb-vector https://github.com/clojure/core.rrb-vector - data.finger-tree https://github.com/clojure/data.finger-tree - data.int-map https://github.com/clojure/data.int-map - data.priority-map https://github.com/clojure/data.priority-map - data.union-find https://github.com/jordanlewis/data.union-find - fast-zip https://github.com/akhudek/fast-zip - immutable-bitset https://github.com/ztellman/immutable-bitset - ordered https://github.com/flatland/ordered - ring-buffer https://github.com/amalloy/ring-buffer under Datastructures. Monads has been implemented many times, check https://github.com/clojure/algo.monads for one example. Mary Rose Cook wrote an impressive as well as entertaining article on implementing Fibonacci Heaps in Clojure http://maryrosecook.com/blog/post/the-fibonacci-heap-ruins-my-life Sketchy datastructures exists, https://github.com/bigmlcom/sketchy (bloom, hyperloglog, min-distance hashing etc). Another Bloom Filter: https://github.com/kyleburton/clj-bloom It is said that splay trees aren't very suitable for implementing as an immutable structure because they mutate on read. I guess you'll get quite exact guidelines in the various core libraries on how to implement the Java collection methods (in general, all mutating methods throw methodNotImplementedExceptions). Good luck! /Linus On Monday, August 10, 2015 at 12:31:25 AM UTC+2, William la Forge wrote: 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 newbie, I'd appreciate some pointers, relevant docs and/or examples. Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.