Discrete Interval Encoding Tree (Diet). It stores subsets of types having a total order, a predecessor and a successor function described by Discrete[A]
Diet is a binary search tree where each node contains a range of values and the set of all nodes is a set of disjoint sets.
In the best case, when there are no "holes" in the stored set, the interval representation consists of just one single interval (node) and finding, inserting and deleting operations are O(1). In the worse case, where there are not two adjacent elements in the set, the representation is equivalent to a binary search tree.
Attributes
- Companion
- object
- Source
- Diet.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
intersection with the given range
intersection with the given diet
alias for add
alias for add
Returns the union of this Diet with another Diet.
alias for remove
alias for removeRange
Attributes
- Source
- Diet.scala
Adds new value to the tree.
Add new value range [x, y] to the Diet.
Returns true if x is a value is in the tree.
Returns true if all values in the range are contained in the tree
Attributes
- Source
- Diet.scala
Attributes
- Source
- Diet.scala
Attributes
- Source
- Diet.scala
Attributes
- Source
- Diet.scala
max value in the tree
min value in the tree
remove x from the tree
remove a range from Diet
Attributes
- Source
- Diet.scala
Attributes
- Source
- Diet.scala
Deprecated methods
Attributes
- Deprecated
- true
- Source
- Diet.scala
Abstract fields
Attributes
- Source
- Diet.scala