Rebuild reconstructs the tree from a list of intervals (for coalescing).
(intervals []ast.Interval)
| 229 | |
| 230 | // Rebuild reconstructs the tree from a list of intervals (for coalescing). |
| 231 | func (t *IntervalTree) Rebuild(intervals []ast.Interval) { |
| 232 | t.Clear() |
| 233 | for _, interval := range intervals { |
| 234 | t.Insert(interval) |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // AVL tree helper functions |
| 239 |