Package tutorial.clustering
Class SameSizeKMeans.PreferenceComparator
- java.lang.Object
-
- tutorial.clustering.SameSizeKMeans.PreferenceComparator
-
- All Implemented Interfaces:
it.unimi.dsi.fastutil.ints.IntComparator
,java.util.Comparator<java.lang.Integer>
- Enclosing class:
- SameSizeKMeans<V extends NumberVector>
public static class SameSizeKMeans.PreferenceComparator extends java.lang.Object implements it.unimi.dsi.fastutil.ints.IntComparator
Sort a list of integers (= cluster numbers) by the distances.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SameSizeKMeans.Meta
c
Meta to use for comparison.
-
Constructor Summary
Constructors Constructor Description PreferenceComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(int o1, int o2)
it.unimi.dsi.fastutil.ints.IntComparator
select(SameSizeKMeans.Meta c)
Set the meta to sort by-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
c
SameSizeKMeans.Meta c
Meta to use for comparison.
-
-
Method Detail
-
compare
public int compare(int o1, int o2)
- Specified by:
compare
in interfaceit.unimi.dsi.fastutil.ints.IntComparator
-
select
public it.unimi.dsi.fastutil.ints.IntComparator select(SameSizeKMeans.Meta c)
Set the meta to sort by- Parameters:
c
- Meta to sort by- Returns:
- The comparator
-
-