sealed
trait
BKTree[A] extends AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
-
-
-
final
def
-?-(a: A)(implicit A: MetricSpace[A]): Boolean
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
=?=(a: A, n: Int)(implicit A: MetricSpace[A]): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
contains(a: A)(implicit A: MetricSpace[A]): Boolean
-
def
containsApproximate(a: A, n: Int)(implicit A: MetricSpace[A]): Boolean
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): java.lang.Class[_]
-
def
hashCode(): Int
-
def
isEmpty: Boolean
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[B](f: (A) ⇒ B): BKTree[B]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
size: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
values: List[A]
-
def
valuesApproximate(a: A, n: Int)(implicit A: MetricSpace[A]): List[A]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
|=|(a: A, n: Int)(implicit A: MetricSpace[A]): List[A]
Inherited from AnyRef
Inherited from Any
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 MetricSpace type class, rather than the more usual 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
(Since version 7.0.1) This class depends on
MetricSpace
which is deprecated, too.