Class/Object

scalaz

BKTree

Related Docs: object BKTree | package scalaz

Permalink

sealed abstract class BKTree[A] extends Product with Serializable

Burkhard-Keller trees provide an implementation of sets which apart from the ordinary operations also has an approximate member search, allowing you to search for elements that are of a distance n from the element you are searching for. The distance is determined using a metric on the type of elements. Therefore all elements must implement the scalaz.MetricSpace type class, rather than the more usual scalaz.Ordering.

The worst case complexity of many of these operations is quite bad, but the expected behavior varies greatly with the metric. For example, the discrete metric (distance x y | y == x = 0 | otherwise = 1) makes BK-trees behave abysmally. The metrics mentioned above should give good performance characteristics.

This implementation is a port of Haskell's Data.Set.BKTree

Annotations
@deprecated
Deprecated

(Since version 7.0.1) This class depends on MetricSpace which is deprecated, too.

Source
BKTree.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BKTree
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Permalink
    Definition Classes
    Equals
  2. abstract def productArity: Int

    Permalink
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any

    Permalink
    Definition Classes
    Product

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 +(a: A)(implicit A: MetricSpace[A]): BKTree[A]

    Permalink
  4. def ++(t: BKTree[A])(implicit m: MetricSpace[A]): BKTree[A]

    Permalink
  5. def -(a: A)(implicit A: MetricSpace[A]): BKTree[A]

    Permalink
  6. def --(t: BKTree[A])(implicit m: MetricSpace[A]): BKTree[A]

    Permalink
  7. final def -?-(a: A)(implicit A: MetricSpace[A]): Boolean

    Permalink

    An alias for contains

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def =?=(a: A, n: Int)(implicit A: MetricSpace[A]): Boolean

    Permalink

    An alias for containsApproximate

  10. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. final def contains(a: A)(implicit A: MetricSpace[A]): Boolean

    Permalink

    Returns true of this set contains a.

    Returns true of this set contains a.

    Annotations
    @tailrec()
  13. def containsApproximate(a: A, n: Int)(implicit A: MetricSpace[A]): Boolean

    Permalink

    Returns true if this set contains an element which has a distance from a that is less than or equal to n

  14. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def isEmpty: Boolean

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def map[B](f: (A) ⇒ B): BKTree[B]

    Permalink
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  25. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  26. def productPrefix: String

    Permalink
    Definition Classes
    Product
  27. def size: Int

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

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def values: List[A]

    Permalink
  31. def valuesApproximate(a: A, n: Int)(implicit A: MetricSpace[A]): List[A]

    Permalink

    Returns the elements which have an distance from a that is less than or equal to n.

  32. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def |=|(a: A, n: Int)(implicit A: MetricSpace[A]): List[A]

    Permalink

    An alias for valuesApproximate

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped