public class SimpleEnumeratingScheme extends java.lang.Object implements NamingScheme
Modifier and Type | Field and Description |
---|---|
private Clustering<?> |
clustering
Clustering this scheme is applied to.
|
private it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.String> |
namefreq
Count how often each name occurred so far.
|
private java.util.Map<Cluster<?>,java.lang.String> |
names
Assigned cluster names.
|
private static java.lang.String |
NULLPOSTFIX
This is the postfix added to the first cluster, which will be removed when
there is only one cluster of this name.
|
Constructor and Description |
---|
SimpleEnumeratingScheme(Clustering<?> clustering)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNameFor(Cluster<?> cluster)
Retrieve the cluster name.
|
private void |
updateNames()
Assign names to each cluster (which doesn't have a name yet)
|
private Clustering<?> clustering
private it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.String> namefreq
private java.util.Map<Cluster<?>,java.lang.String> names
private static final java.lang.String NULLPOSTFIX
public SimpleEnumeratingScheme(Clustering<?> clustering)
clustering
- Clustering result to name.private void updateNames()
public java.lang.String getNameFor(Cluster<?> cluster)
updateNames()
getNameFor
in interface NamingScheme
cluster
- cluster to get a name forCopyright © 2019 ELKI Development Team. License information.