jfdm / idris-containers

Various data structures for use in the Idris Language.
BSD 3-Clause "New" or "Revised" License
95 stars 21 forks source link

Design, usability and performance improvements for AVL tree #11

Closed ahmadsalim closed 9 years ago

ahmadsalim commented 9 years ago

I have tried to adjust some things in the AVL tree implementation in order to make the design more coherent, and improve performance.

I have made the following changes:

jfdm commented 9 years ago

Ah cheers. I do not have time to look at this for a couple of days. Deadlines, Deadlines and Deadlines. But i will try to soon. As long as the tests complete, and my code that uses the graph still works, then it should be fine.

ahmadsalim commented 9 years ago

It is fine :). I did run make test and it said that all tests had passed and the Graph code should still work fine I believe.

ahmadsalim commented 9 years ago

Also, notice that at some point we can probably share the backend Tree implementation now and have a lot of common code between e.g. AVL Trees and RB Trees since the invariants are separate. It is only things that modify the tree that actually need to be written separately since they affect the invariants.

jfdm commented 9 years ago

about reducing the code duplication. That sounds fine, but it is something that I won't be looking at in much depth anyway, at least for the next few months.