public class SimpleEnumeratingScheme extends Object implements NamingScheme
Modifier and Type | Field and Description |
---|---|
private Clustering<?> |
clustering
Clustering this scheme is applied to.
|
private Map<String,Integer> |
namecount
count how often each name occurred so far.
|
private Map<Cluster<?>,String> |
names
Assigned cluster names.
|
private static 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 |
---|---|
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 static final String nullpostfix
public SimpleEnumeratingScheme(Clustering<?> clustering)
clustering
- Clustering result to name.private void updateNames()
public String getNameFor(Cluster<?> cluster)
updateNames()
getNameFor
in interface NamingScheme
cluster
- cluster to get a name for