Dear all, I have made a very small library, which is very preliminary but usable.
It allows to create a distribution and draw from it. Insertions, deletions, drawing are in O(log n). example: (def dist (distribution-from-seqable {:a 1 :b 2})) (draw dist) => :a with proba 1/3, :b with proba 2/3 There is still a lot of work to do. It is currently slower than Clojure hash-maps, for insertions, but not ridiculously so. It takes more memory too, but it will improve. User, suggestions and contributions are more than welcome. You can mail me if you have any question on how to use it. It is on clojars: nicolasoury.random-hash-tries. There is also a public repository: git://nicolasoury.repositoryhosting.com/nicolasoury/random-hash-tries.git Best regards, Nicolas. -- 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