aepsil0n/acacia — pull request #6 by aepsil0n (2014-12-04 16:11:52+00:00)
Title: Restructure traits

There are now six separate traits to describe the behaviour of a tree:

- `Node` provides the basic geometry and structure of the tree, including its center and width and whether it is empty, a leaf or a branch.
- `AssociatedData` is an optional trait for trees that store associated data per node.
- `ObjectQuery` and `DataQuery` allow recursing through the tree as prescribed by a closure that decides for each node, whether further recursion is required. One can run a callback on associated data or the objects stored in each leaf node.
- `PureTree: Node + ObjectQuery` is a tree that has only spatial information and thus only allows object queries.
- `Tree: PureTree + AssociatedData + DataQuery` additionally allows running queries on its data.

Both Tree and PureTree have an implementation.