public class OnedimensionalDistanceFunction extends AbstractSpatialNorm implements DimensionSelectingSubspaceDistanceFunction<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(Object obj) |
VectorTypeInformation<? super NumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
getSelectedDimension()
Returns the selected dimension.
|
long[] |
getSelectedDimensions()
Deprecated.
|
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.
|
instantiate
dimensionality, dimensionality, dimensionality, dimensionality
isMetric, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
instantiate, isMetric, isSymmetric
public OnedimensionalDistanceFunction(int dim)
dim
- Dimensionpublic double distance(NumberVector v1, NumberVector v2)
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
distance
in class AbstractPrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic double norm(NumberVector obj)
Norm
norm
in interface Norm<NumberVector>
obj
- Objectpublic int getSelectedDimension()
@Deprecated public long[] getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunction
getSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<NumberVector>
@Deprecated public void setSelectedDimensions(long[] dimensions)
DimensionSelectingSubspaceDistanceFunction
setSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<NumberVector>
dimensions
- a bit set designating the new selected dimensionspublic VectorTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector>
getInputTypeRestriction
in class AbstractNumberVectorDistanceFunction
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.