sealed abstract
class
Diet[A] extends AnyRef
Abstract Value Members
-
abstract
val
isEmpty: Boolean
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
&(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
+(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
+(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
++(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
-(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
-(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
final
def
==(arg0: Any): Boolean
-
def
add(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
addRange(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
contains(v: A)(implicit order: Order[A]): Boolean
-
def
containsRange(range: Range[A])(implicit order: Order[A]): Boolean
-
-
-
def
finalize(): Unit
-
def
foldLeft[B](s: B)(f: (B, A) ⇒ B)(implicit enumA: Enum[A], orderA: Order[A]): B
-
def
foldRight[B](s: B)(f: (B, A) ⇒ B)(implicit enumA: Enum[A], orderA: Order[A]): B
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
intervals: List[Range[A]]
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[B](f: (A) ⇒ B)(implicit arg0: Enum[B], arg1: Order[B]): Diet[B]
-
-
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
remove(x: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
def
removeRange(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toList()(implicit discrete: Enum[A], order: Order[A]): List[A]
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
|(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]
Discrete Interval Encoding Tree (Diet). It stores subsets of types having a total order, a predecessor and a successor function described by Enum[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.