|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.result.textwriter.naming.SimpleEnumeratingScheme
public class SimpleEnumeratingScheme
Simple enumerating naming scheme. Cluster names are generated as follows: - if the cluster has a name assigned, use it - otherwise use getNameAutomatic() as name, and add an enumeration postfix
Field Summary | |
---|---|
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 Summary | |
---|---|
SimpleEnumeratingScheme(Clustering<?> clustering)
Constructor. |
Method Summary | |
---|---|
String |
getNameFor(Cluster<?> cluster)
Retrieve the cluster name. |
private void |
updateNames()
Assign names to each cluster (which doesn't have a name yet) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Clustering<?> clustering
private Map<String,Integer> namecount
private Map<Cluster<?>,String> names
private static final String nullpostfix
Constructor Detail |
---|
public SimpleEnumeratingScheme(Clustering<?> clustering)
clustering
- Clustering result to name.Method Detail |
---|
private void updateNames()
public String getNameFor(Cluster<?> cluster)
updateNames()
getNameFor
in interface NamingScheme
cluster
- cluster to get a name for
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |