@Alias(value="de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.DimensionSelectingDistanceFunction") public class OnedimensionalDistanceFunction extends AbstractNumberVectorDistanceFunction implements SpatialPrimitiveDistanceFunction<NumberVector>, DimensionSelectingSubspaceDistanceFunction<NumberVector>, Norm<NumberVector>
| Modifier and Type | Class and Description |
|---|---|
static class |
OnedimensionalDistanceFunction.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
dim
The dimension to be considered for distance computation.
|
| Constructor and Description |
|---|
OnedimensionalDistanceFunction(int dim)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
VectorTypeInformation<? super NumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
getSelectedDimension()
Returns the selected dimension.
|
long[] |
getSelectedDimensions()
Deprecated.
|
int |
hashCode() |
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
double |
norm(NumberVector obj)
Compute the norm of object obj.
|
void |
setSelectedDimensions(long[] dimensions)
Deprecated.
|
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionalityclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitinstantiatepublic OnedimensionalDistanceFunction(int dim)
dim - Dimensionpublic double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunctiondistance in interface NumberVectorDistanceFunction<NumberVector>distance in interface PrimitiveDistanceFunction<NumberVector>v1 - first DatabaseObjectv2 - second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionminDist in interface SpatialPrimitiveDistanceFunction<NumberVector>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic double norm(NumberVector obj)
Normnorm in interface Norm<NumberVector>obj - Objectpublic int getSelectedDimension()
@Deprecated public long[] getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunctionWarning: no defensive copy is performed.
getSelectedDimensions in interface DimensionSelectingSubspaceDistanceFunction<NumberVector>@Deprecated public void setSelectedDimensions(long[] dimensions)
DimensionSelectingSubspaceDistanceFunctionWarning: no defensive copy is performed.
setSelectedDimensions in interface DimensionSelectingSubspaceDistanceFunction<NumberVector>dimensions - a bit set designating the new selected dimensionspublic VectorTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector>getInputTypeRestriction in class AbstractNumberVectorDistanceFunctionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2019 ELKI Development Team. License information.