Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Class Clustering<M extends Model>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.Clustering<M>
Type Parameters:
M - Model type
All Implemented Interfaces:
Result

public class Clustering<M extends Model>
extends Object
implements Result

Result class for clusterings. Can be used for both hierarchical and non-hierarchical clusterings. The class does not enforce or rely on clusterings to be a tree or DAG, instead they can be an arbitrary forest of directed graphs that COULD contain cycles. This class is NOT iterable for a simple reason: there is more than one method to do so. You need to specify whether you want to use getToplevelClusters() or getAllClusters().

Author:
Erich Schubert

Field Summary
private  List<Cluster<M>> toplevelclusters
          Keep a list of top level clusters.
 
Constructor Summary
Clustering()
          Constructor for an empty clustering
Clustering(List<Cluster<M>> toplevelclusters)
          Constructor with a list of top level clusters
 
Method Summary
 void addCluster(Cluster<M> n)
          Add a cluster to the clustering.
 List<Cluster<M>> getAllClusters()
          Collect all clusters (recursively) into a List.
 String getName()
          Get a user-understandable name for this result.
 List<Cluster<M>> getToplevelClusters()
          Return top level clusters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

toplevelclusters

private List<Cluster<M extends Model>> toplevelclusters
Keep a list of top level clusters.

Constructor Detail

Clustering

public Clustering(List<Cluster<M>> toplevelclusters)
Constructor with a list of top level clusters

Parameters:
toplevelclusters - Top level clusters

Clustering

public Clustering()
Constructor for an empty clustering

Method Detail

addCluster

public void addCluster(Cluster<M> n)
Add a cluster to the clustering.

Parameters:
n - new cluster

getToplevelClusters

public List<Cluster<M>> getToplevelClusters()
Return top level clusters

Returns:
top level clusters

getAllClusters

public List<Cluster<M>> getAllClusters()
Collect all clusters (recursively) into a List.

Returns:
List of all clusters.

getName

public String getName()
Description copied from interface: Result
Get a user-understandable name for this result. Defaults may be returned such as "list" for a list result.

Specified by:
getName in interface Result
Returns:
result name

Release 0.3 (2010-03-31_1612)