Another apporach I think would be modifying the data structure of hierarchy itself. The idea is to add a counter to ancestors and descendants. :ancestors: { :c #{ [:a1 1] [:a2 2] } } So, the counter 2 on :a2 means how many paths can you get :c to reach :a2. When the counter reaches 0, you can remove it completely. Otherwise, decrement it.
This approach requires to change all the functions related to hierarchy, and the data structure will be incompatible to the original one. But the speed is gonna be fast. -- 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