public class DimensionSelectingLatLngDistanceFunction extends AbstractVectorDoubleDistanceFunction implements SpatialPrimitiveDoubleDistanceFunction<NumberVector<?>>
Modifier and Type | Class and Description |
---|---|
static class |
DimensionSelectingLatLngDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
(package private) int |
dimlat
Latitude dimension.
|
(package private) int |
dimlng
Longitude dimension.
|
Constructor and Description |
---|
DimensionSelectingLatLngDistanceFunction(int dimlat,
int dimlng)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleDistance(NumberVector<?> o1,
NumberVector<?> o2)
Computes the distance between two given Objects according to this distance
function.
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
SimpleTypeInformation<? super NumberVector<?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
<T extends NumberVector<?>> |
instantiate(Relation<T> relation)
Instantiate with a database to get the actual distance query.
|
DoubleDistance |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
distance, getDistanceFactory
isMetric, isSymmetric
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance
getDistanceFactory, isMetric, isSymmetric
final int dimlat
final int dimlng
public DimensionSelectingLatLngDistanceFunction(int dimlat, int dimlng)
dimlat
- Dimension storing the latitudedimlng
- Dimension storing the longitudepublic double doubleDistance(NumberVector<?> o1, NumberVector<?> o2)
PrimitiveDoubleDistanceFunction
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?>>
o1
- first Objecto2
- second Objectpublic double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleMinDist
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?>>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic DoubleDistance minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic SimpleTypeInformation<? super NumberVector<?>> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in class AbstractVectorDoubleDistanceFunction
public <T extends NumberVector<?>> SpatialPrimitiveDistanceQuery<T,DoubleDistance> instantiate(Relation<T> relation)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
instantiate
in interface SpatialPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
relation
- Representation