Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design Principles #6

Closed
philipa opened this issue Aug 28, 2014 · 1 comment
Closed

Design Principles #6

philipa opened this issue Aug 28, 2014 · 1 comment

Comments

@philipa
Copy link

philipa commented Aug 28, 2014

Please document the design principles behind this API.

  • Can common implementation operations (such as rebalancing) be implemented efficiently using the API, or is that some other interface?
  • Attitude to garbage
  • Internal vs external iteration. Proxing all access through INode (no API to walk just over E's). Why not Visitor?
  • Relationship to other collection libraries
  • Unordered children. What if I know I have a binary tree - its inconvenient to work through a Collection to get to Left and Right.
  • Prior art
@mattunderscorechampion
Copy link
Owner

Common operations like rebalancing may need support from implementation specific SPI components.
I've added support for both external and internal iteration of both nodes and elements.
Binary and structured trees allow direct access to specific nodes and the collection of children has been replaced with an iterator.
Added documentation about prior art.
Garbage is going to depend on the implementation. I've separated out the different implementations as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants