V
- the type of FeatureVector to compute the distances in betweenpublic abstract class AbstractDimensionsSelectingDoubleDistanceFunction<V extends FeatureVector<?>> extends AbstractPrimitiveDistanceFunction<V,DoubleDistance> implements PrimitiveDoubleDistanceFunction<V>, DimensionSelectingSubspaceDistanceFunction<V,DoubleDistance>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDimensionsSelectingDoubleDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected BitSet |
dimensions
The dimensions to be considered for distance computation.
|
static OptionID |
DIMS_ID
Dimensions parameter.
|
Constructor and Description |
---|
AbstractDimensionsSelectingDoubleDistanceFunction(BitSet dimensions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
distance(V o1,
V o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(Object obj) |
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
BitSet |
getSelectedDimensions()
Returns a bit set representing the selected dimensions.
|
void |
setSelectedDimensions(BitSet dimensions)
Sets the selected dimensions according to the set bits in the given BitSet.
|
instantiate, isMetric, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doubleDistance
getInputTypeRestriction
instantiate, isMetric, isSymmetric
public static final OptionID DIMS_ID
protected BitSet dimensions
public AbstractDimensionsSelectingDoubleDistanceFunction(BitSet dimensions)
dimensions
- public DoubleDistance distance(V o1, V o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<V extends FeatureVector<?>,DoubleDistance>
distance
in class AbstractPrimitiveDistanceFunction<V extends FeatureVector<?>,DoubleDistance>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic BitSet getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunction
getSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<V extends FeatureVector<?>,DoubleDistance>
public void setSelectedDimensions(BitSet dimensions)
DimensionSelectingSubspaceDistanceFunction
setSelectedDimensions
in interface DimensionSelectingSubspaceDistanceFunction<V extends FeatureVector<?>,DoubleDistance>
dimensions
- a BitSet designating the new selected dimensionspublic DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<V extends FeatureVector<?>,DoubleDistance>
getDistanceFactory
in class AbstractPrimitiveDistanceFunction<V extends FeatureVector<?>,DoubleDistance>