Class KMeansPlusPlus.Instance<T>
- java.lang.Object
-
- elki.clustering.kmeans.initialization.KMeansPlusPlus.Instance<T>
-
- Type Parameters:
T- Object type handled
- Direct Known Subclasses:
KMeansPlusPlus.MedoidsInstance,KMeansPlusPlus.NumberVectorInstance
- Enclosing class:
- KMeansPlusPlus<O>
protected abstract static class KMeansPlusPlus.Instance<T> extends java.lang.ObjectAbstract instance implementing the weight handling.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Instance(elki.database.ids.DBIDs ids, elki.utilities.random.RandomFactory rnd)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract doubledistance(T a, elki.database.ids.DBIDRef b)Compute the distance of two objects.protected doubleinitialWeights(T first)Initialize the weight list.protected doublenextDouble(double weightsum)protected doubleupdateWeights(T latest)Update the weight list.
-
-
-
Method Detail
-
distance
protected abstract double distance(T a, elki.database.ids.DBIDRef b)
Compute the distance of two objects.- Parameters:
a- First objectb- Second object- Returns:
- Distance
-
initialWeights
protected double initialWeights(T first)
Initialize the weight list.- Parameters:
first- Added ID- Returns:
- Weight sum
-
updateWeights
protected double updateWeights(T latest)
Update the weight list.- Parameters:
latest- Added ID- Returns:
- Weight sum
-
nextDouble
protected double nextDouble(double weightsum)
-
-