Class/Object

dogs

Diet

Related Docs: object Diet | package dogs

Permalink

sealed abstract class Diet[A] extends AnyRef

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Diet
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val isEmpty: Boolean

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    intersection with the given diet

  4. def +(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    alias for add

  5. def +(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    alias for add

  6. def ++(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    Returns the union of this Diet with another Diet.

  7. def -(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    alias for removeRange

  8. def -(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    alias for remove

  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def add(value: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    Adds new value to the tree.

  11. def addRange(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    Add new value range [x, y] to the Diet.

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def contains(v: A)(implicit order: Order[A]): Boolean

    Permalink

    Returns true if x is a value is in the tree.

  15. def containsRange(range: Range[A])(implicit order: Order[A]): Boolean

    Permalink
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def foldLeft[B](s: B)(f: (B, A) ⇒ B)(implicit enumA: Enum[A], orderA: Order[A]): B

    Permalink
  20. def foldRight[B](s: B)(f: (B, A) ⇒ B)(implicit enumA: Enum[A], orderA: Order[A]): B

    Permalink
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def intervals: List[Range[A]]

    Permalink

    Returns a list of all disjoint sets in the tree where each set is represented by ARange.

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def map[B](f: (A) ⇒ B)(implicit arg0: Enum[B], arg1: Order[B]): Diet[B]

    Permalink
  26. def max: Option[A]

    Permalink

    max value in the tree

  27. def min: Option[A]

    Permalink

    min value in the tree

  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def remove(x: A)(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    remove x from the tree

  32. def removeRange(range: Range[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    remove a range from Diet

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toList()(implicit discrete: Enum[A], order: Order[A]): List[A]

    Permalink

    Convert tree in a sorted list from all disjoint sets in the tree.

  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def |(that: Diet[A])(implicit discrete: Enum[A], order: Order[A]): Diet[A]

    Permalink

    Returns the union of this Diet with another Diet.

Inherited from AnyRef

Inherited from Any

Ungrouped