Ops

trait Ops[M, P, H] extends DistanceMeasure[M, P, H]
trait DistanceMeasure[M, P, H]
class Object
trait Matchable
class Any
trait Impl[M]
trait LongImpl
trait SqrImpl

Value members

Abstract methods

def approximate(thresh: M): Ops[M, P, H]

Composes this distance so that a threshold is applied to point-point distances. If the point-point distance of the underlying measure returns a value less than or equal the given threshold, then instead the value 0L is returned. This allows for quicker searches so that a nearest neighbour becomes an approximate nn within the given threshold (the first arbitrary point encountered with a distance smaller than the threshold will be returned).

Composes this distance so that a threshold is applied to point-point distances. If the point-point distance of the underlying measure returns a value less than or equal the given threshold, then instead the value 0L is returned. This allows for quicker searches so that a nearest neighbour becomes an approximate nn within the given threshold (the first arbitrary point encountered with a distance smaller than the threshold will be returned).

Note that the threshold is directly compared to the result of distance, thus if the underlying measure uses a skewed distance, this must be taken into account. For example, if euclideanSq is used, and points within a radius of 4 should be approximated, a threshold of 4 * 4 = 16 must be chosen!

def clip(hyperCube: H): Ops[M, P, H]

Applies a filter to this measure by constraining distances to objects b which lie within the given IntSquare. That is, if for example distance( a, b ) is called, first it is checked if b is within hyperCube. If so, the underlying measure is calculated, otherwise, Long.MaxValue is returned. This behaviour extends to the minDistance and maxDistance methods.

Applies a filter to this measure by constraining distances to objects b which lie within the given IntSquare. That is, if for example distance( a, b ) is called, first it is checked if b is within hyperCube. If so, the underlying measure is calculated, otherwise, Long.MaxValue is returned. This behaviour extends to the minDistance and maxDistance methods.

def exceptOrthant(idx: Int): Ops[M, P, H]
def orthant(idx: Int): Ops[M, P, H]

Inherited methods

def compareMeasure(a: M, b: M): Int
Inherited from:
DistanceMeasure
def distance(a: P, b: P): M

Calculates the distance between two points.

Calculates the distance between two points.

Value parameters:
a

the input query point

b

a point in the octree

Inherited from:
DistanceMeasure
def isMeasureGreater(a: M, b: M): Boolean
Inherited from:
DistanceMeasure
def isMeasureZero(m: M): Boolean
Inherited from:
DistanceMeasure
def maxDistance(a: P, b: H): M

Calculates the maximum distance between a point and any possible point of a given hyper-cube. In the euclidean case, this is the distance to the hyper-cube b's corner that is furthest to the point a, no matter whether a is contained in b or not.

Calculates the maximum distance between a point and any possible point of a given hyper-cube. In the euclidean case, this is the distance to the hyper-cube b's corner that is furthest to the point a, no matter whether a is contained in b or not.

Inherited from:
DistanceMeasure
def maxValue: M

A value which will never be exceeded by the measure.

A value which will never be exceeded by the measure.

Inherited from:
DistanceMeasure
def minDistance(a: P, b: H): M

Calculates the minimum distance between a point and any possible point of a given hyper-cube. In the euclidean case, this is the distance to the hyper-cube b's corner that is closest to the point a, if a lies outside of b, or zero, if a lies within b.

Calculates the minimum distance between a point and any possible point of a given hyper-cube. In the euclidean case, this is the distance to the hyper-cube b's corner that is closest to the point a, if a lies outside of b, or zero, if a lies within b.

Inherited from:
DistanceMeasure
def newArray(size: Int): Array[M]
Inherited from:
DistanceMeasure