de.lmu.ifi.dbs.elki.distance.distancefunction.geo
Class DimensionSelectingLatLngDistanceFunction
java.lang.Object
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction
de.lmu.ifi.dbs.elki.distance.distancefunction.geo.DimensionSelectingLatLngDistanceFunction
- All Implemented Interfaces:
- DistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDoubleDistanceFunction<NumberVector<?,?>>, InspectionUtilFrequentlyScanned, Parameterizable
public class DimensionSelectingLatLngDistanceFunction
- extends AbstractVectorDoubleDistanceFunction
Distance function for 2D vectors in Latitude, Longitude form.
Field Summary |
(package private) int |
dimlat
Latitude dimension |
(package private) int |
dimlng
Longitude dimension |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dimlat
final int dimlat
- Latitude dimension
dimlng
final int dimlng
- Longitude dimension
DimensionSelectingLatLngDistanceFunction
public DimensionSelectingLatLngDistanceFunction(int dimlat,
int dimlng)
- Constructor.
- Parameters:
dimlat
- Dimension storing the latitudedimlng
- Dimension storing the longitude
doubleDistance
public double doubleDistance(NumberVector<?,?> o1,
NumberVector<?,?> o2)
- Description copied from interface:
PrimitiveDoubleDistanceFunction
- Computes the distance between two given Objects according to this distance
function.
- Parameters:
o1
- first Objecto2
- second Object
- Returns:
- the distance between two given Objects according to this distance
function
getInputTypeRestriction
public SimpleTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
- Description copied from interface:
DistanceFunction
- Get the input data type of the function.
- Specified by:
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
- Specified by:
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
- Overrides:
getInputTypeRestriction
in class AbstractVectorDoubleDistanceFunction
- Returns:
- Type restriction