(w io.Writer)
| 705 | } |
| 706 | |
| 707 | func (n *SweepNode) Print(w io.Writer) { |
| 708 | n.print(w, "", 0) |
| 709 | } |
| 710 | |
| 711 | // TODO: test performance versus (2,4)-tree (current LEDA implementation), (2,16)-tree (as proposed by S. Naber/Näher in "Comparison of search-tree data structures in LEDA. Personal communication" apparently), RB-tree (likely a good candidate), and an AA-tree (simpler implementation may be faster). Perhaps an unbalanced (e.g. Treap) works well due to the high number of insertions/deletions. |
| 712 | // In any case, measure the amount of finds and inserts/deletes. If finds >> inserts probably AVL is better, if somewhat similar or inserts > finds then perhaps an RB tree (store color in sign bit of node's height). |