Import std.collections.interval_tree
std.collections.interval_tree
IntervalTree<K, V>: values, each over an interval of keys from a low to a high, both in it,
which finds the intervals that overlap another, or hold a key, without going over the others.
It's a balanced tree of the intervals, by low and then by high, each node with the values over
its interval and the highest high under it, so a search skips what ends too soon.
std/collections/interval_tree.fb
Types
IntervalTree
class
@DebugElements Public Class IntervalTree<K: Comparable, V> Implements Iterable<(K, K, V)>, Cloneable, Defaultable
Values over ranges of keys, found by the ranges that hold a key or overlap another range.
std/collections/interval_tree.fb, line 29
-
How many values it has, over all its intervals.
-
Adds a value over the interval from
lowtohigh, after any others over it. A high belowlowpanics, and so does an end that isn't equal to itself, like NaN. -
Removes the first
valueover the interval fromlowtohighthat's equal tovalue, and tells whether there was one. An end that isn't equal to itself has none. -
Whether a value equal to
valueis over the interval fromlowtohigh, which an end that isn't equal to itself never has. -
Takes every interval out.
-
The intervals that overlap the one from
lowtohigh, with their values, bylowand then byhigh, in a new array. A high belowlowoverlaps nothing, and so does an end that isn't equal to itself. -
The intervals that hold
key, with their values, by low and then by high, in a new array. -
Each interval's low and high with each of its values, by low and then by high, in a new array.
-
A new, empty IntervalTree.
-
A new IntervalTree with the same intervals and values.
-
Each interval's low and high with each of its values, as a tuple, by low and then by high. Adding or removing a value while going over them panics.
IntervalTreeIterator
struct
Public Struct IntervalTreeIterator<K: Comparable, V> Implements Iterator<(K, K, V)>
The intervals in order: the nodes on the way down to the next one, the node it's at, and which of its values comes next.
std/collections/interval_tree.fb, line 290
-
The next value, or Null when there are no more.
Doc from
std.core.iterator.Iterator.Next.
Extends
IntervalTree
extend
Extend IntervalTree<K, V> Implements Equatable
No doc comment.
std/collections/interval_tree.fb, line 331
-
Whether
aandbare equal.Doc from
std.core.interfaces.Equatable.Operator==.
IntervalTree
extend
Extend IntervalTree<K, V> Implements Printable
No doc comment.
std/collections/interval_tree.fb, line 341
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
Report an issue with this page or with FutureBlitz on GitHub.