V
- the type of FeatureVector to compute the distances in betweenpublic abstract class AbstractDimensionsSelectingDistanceFunction<V extends FeatureVector<?>> extends java.lang.Object implements PrimitiveDistanceFunction<V>, DimensionSelectingSubspaceDistanceFunction<V>
long[]
.Modifier and Type | Class and Description |
---|---|
static class |
AbstractDimensionsSelectingDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected long[] |
dimensions
The dimensions to be considered for distance computation.
|
Constructor and Description |
---|
AbstractDimensionsSelectingDistanceFunction(long[] dimensions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(V o1,
V o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
long[] |
getSelectedDimensions()
Returns a bit set representing the selected dimensions.
|
int |
hashCode() |
void |
setSelectedDimensions(long[] dimensions)
Sets the selected dimensions according to the set bits in the given BitSet.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getInputTypeRestriction, instantiate
isMetric, isSquared, isSymmetric
protected long[] dimensions
public AbstractDimensionsSelectingDistanceFunction(long[] dimensions)
dimensions
- public double distance(V o1, V o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<V extends FeatureVector<?>>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic long[] getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunction
Warning: no defensive copy is performed.
getSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<V extends FeatureVector<?>>
public void setSelectedDimensions(long[] dimensions)
DimensionSelectingSubspaceDistanceFunction
Warning: no defensive copy is performed.
setSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<V extends FeatureVector<?>>
dimensions
- a bit set designating the new selected dimensionspublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.