ItemDistance class abstract

A function method which computes the distance between two {@link ItemBoundable}s in an {@link STRtree}. Used for Nearest Neighbour searches.

To make a distance function suitable for querying a single index tree via {@link STRtree#nearestNeighbour(ItemDistance)} , the function should have a non-zero reflexive distance. That is, if the two arguments are the same object, the distance returned should be non-zero. If it is required that only pairs of distinct items be returned, the distance function must be anti-reflexive, and must return {@link Double#MAX_VALUE} for identical arguments.

@author Martin Davis

Implementers

Constructors

ItemDistance()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

distance(ItemBoundable item1, ItemBoundable item2) double
Computes the distance between two items.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited