M
- Model typepublic class Clustering<M extends Model> extends BasicResult
Modifier and Type | Field and Description |
---|---|
private ModifiableHierarchy<Cluster<M>> |
hierarchy
Cluster hierarchy.
|
private java.util.List<Cluster<M>> |
toplevelclusters
Keep a list of top level clusters.
|
static SimpleTypeInformation<Clustering<?>> |
TYPE
Type information, for relation matching.
|
Constructor and Description |
---|
Clustering(java.lang.String name,
java.lang.String shortname)
Constructor for an empty clustering
|
Clustering(java.lang.String name,
java.lang.String shortname,
java.util.List<Cluster<M>> toplevelclusters)
Constructor with a list of top level clusters
|
Modifier and Type | Method and Description |
---|---|
void |
addChildCluster(Cluster<M> parent,
Cluster<M> child)
Add a cluster to the clustering.
|
void |
addToplevelCluster(Cluster<M> clus)
Add a cluster to the clustering.
|
java.util.List<Cluster<M>> |
getAllClusters()
Collect all clusters (recursively) into a List.
|
Hierarchy<Cluster<M>> |
getClusterHierarchy()
Get the cluster hierarchy.
|
static java.util.List<Clustering<? extends Model>> |
getClusteringResults(Result r)
Collect all clustering results from a Result
|
java.util.List<Cluster<M>> |
getToplevelClusters()
Return top level clusters
|
It<Cluster<M>> |
iterToplevelClusters()
Iterate over the top level clusters.
|
getLongName, getShortName
addChildResult, getHierarchy, setHierarchy
public static final SimpleTypeInformation<Clustering<?>> TYPE
private java.util.List<Cluster<M extends Model>> toplevelclusters
private ModifiableHierarchy<Cluster<M extends Model>> hierarchy
public Clustering(java.lang.String name, java.lang.String shortname, java.util.List<Cluster<M>> toplevelclusters)
name
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)toplevelclusters
- Top level clusterspublic Clustering(java.lang.String name, java.lang.String shortname)
name
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)public void addToplevelCluster(Cluster<M> clus)
clus
- new clusterpublic void addChildCluster(Cluster<M> parent, Cluster<M> child)
parent
- Parent clusterchild
- Child cluster.public java.util.List<Cluster<M>> getToplevelClusters()
public Hierarchy<Cluster<M>> getClusterHierarchy()
public java.util.List<Cluster<M>> getAllClusters()
public It<Cluster<M>> iterToplevelClusters()
public static java.util.List<Clustering<? extends Model>> getClusteringResults(Result r)
r
- ResultCopyright © 2019 ELKI Development Team. License information.