private double addRecursively(ArrayList<double[]> hull,Hierarchy<Cluster<Model>> hier,Cluster<Model> clus){
  final DBIDs ids=clus.getIDs();
  double weight=ids.size();
  for (DBIDIter iter=ids.iter(); iter.valid(); iter.advance()) {
    double[] projP=proj.fastProjectDataToRenderSpace(rel.get(iter));
    if (projP[0] != projP[0] || projP[1] != projP[1]) {
      continue;
    }
    hull.add(projP);
  }
  for (Iter<Cluster<Model>> iter=hier.iterChildren(clus); iter.valid(); iter.advance()) {
    weight+=.5 * addRecursively(hull,hier,iter.get());
  }
  return weight;
}

private double addRecursively ( ArrayList < double [ ] > hull , Hierarchy < Cluster < Model > > hier , Cluster < Model > clus ) { final DBIDs ids = clus . getIDs ( ) ; double weight = ids . size ( ) ; for ( DBIDIter iter = ids . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { double [ ] projP = proj . fastProjectDataToRenderSpace ( rel . get ( iter ) ) ; if ( projP [ 0 ] != projP [ 0 ] || projP [ 1 ] != projP [ 1 ] ) { continue ; } hull . add ( projP ) ; } for ( Iter < Cluster < Model > > iter = hier . iterChildren ( clus ) ; iter . valid ( ) ; iter . advance ( ) ) { weight += .5 * addRecursively ( hull , hier , iter . get ( ) ) ; } return weight ; }
recursively add a cluster and its children .
