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, waitgetInputTypeRestriction, instantiateisMetric, isSquared, isSymmetricprotected long[] dimensions
public AbstractDimensionsSelectingDistanceFunction(long[] dimensions)
dimensions - public double distance(V o1, V o2)
PrimitiveDistanceFunctiondistance in interface PrimitiveDistanceFunction<V extends FeatureVector<?>>o1 - first DatabaseObjecto2 - second DatabaseObjectpublic long[] getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunctionWarning: no defensive copy is performed.
getSelectedDimensions in interface DimensionSelectingSubspaceDistanceFunction<V extends FeatureVector<?>>public void setSelectedDimensions(long[] dimensions)
DimensionSelectingSubspaceDistanceFunctionWarning: 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.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2019 ELKI Development Team. License information.