protected static <M extends Model> int[] findDepth(Clustering<M> c) {
    final Hierarchy<Cluster<M>> hier = c.getClusterHierarchy();
    int[] size = { 0, 0 };
    for(It<Cluster<M>> iter = c.iterToplevelClusters(); iter.valid(); iter.advance()) {
      findDepth(hier, iter.get(), size);
    }
    return size;
  }
protected static < M extends Model > int [ ] findDepth ( Clustering < M > c ) { final Hierarchy < Cluster < M > > hier = c . getClusterHierarchy ( ) ; int [ ] size = { 0 , 0 } ; for ( It < Cluster < M > > iter = c . iterToplevelClusters ( ) ; iter . valid ( ) ; iter . advance ( ) ) { findDepth ( hier , iter . get ( ) , size ) ; } return size ; }
Compute the size of the clustering.

@param c Clustering
@return Array storing the depth and the number of leaf nodes.