Package elki.clustering.kmeans.parallel
Class KMeansProcessor.Instance<V extends NumberVector>
- java.lang.Object
-
- elki.clustering.kmeans.parallel.KMeansProcessor.Instance<V>
-
- All Implemented Interfaces:
Processor.Instance
- Enclosing class:
- KMeansProcessor<V extends NumberVector>
public static class KMeansProcessor.Instance<V extends NumberVector> extends java.lang.Object implements Processor.Instance
Instance to process part of the data set, for a single iteration.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private WritableIntegerDataStore
assignment
Cluster assignment storage.private double[][]
centroids
Updated cluster centroidsprivate boolean
changed
Changed flag.private NumberVectorDistance<? super V>
distance
Distance function.private double[][]
means
Current mean vectors.private Relation<V>
relation
Data relation.private int[]
sizes
(Partial) cluster sizesprivate double[]
varsum
Variance sum.
-
Constructor Summary
Constructors Constructor Description Instance(Relation<V> relation, NumberVectorDistance<? super V> distance, WritableIntegerDataStore assignment, double[][] means)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
map(DBIDRef id)
Process ("map") a single object
-
-
-
Field Detail
-
relation
private Relation<V extends NumberVector> relation
Data relation.
-
distance
private NumberVectorDistance<? super V extends NumberVector> distance
Distance function.
-
assignment
private WritableIntegerDataStore assignment
Cluster assignment storage.
-
means
private double[][] means
Current mean vectors.
-
centroids
private double[][] centroids
Updated cluster centroids
-
sizes
private int[] sizes
(Partial) cluster sizes
-
varsum
private double[] varsum
Variance sum.
-
changed
private boolean changed
Changed flag.
-
-
Constructor Detail
-
Instance
public Instance(Relation<V> relation, NumberVectorDistance<? super V> distance, WritableIntegerDataStore assignment, double[][] means)
Constructor.- Parameters:
relation
- Data relationdistance
- Distance functionassignment
- Current assignmentmeans
- Previous mean vectors
-
-
Method Detail
-
map
public void map(DBIDRef id)
Description copied from interface:Processor.Instance
Process ("map") a single object- Specified by:
map
in interfaceProcessor.Instance
- Parameters:
id
- Object to map.
-
-