An alias for contains
An alias for containsApproximate
Returns true of this set contains a
.
Returns true of this set contains a
.
Returns true if this set contains an element which has a distance from a
that is less than or equal to n
Returns the elements which have an distance from a
that is less than or equal to n
.
An alias for valuesApproximate
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
(Since version 7.0.1) This class depends on
MetricSpace
which is deprecated, too.