private Pair<long[],ArrayModifiableDBIDs> findParent(Relation<V> relation,Pair<long[],ArrayModifiableDBIDs> child,TCustomHashMap<long[],List<ArrayModifiableDBIDs>> clustersMap){
  NumberVector child_centroid=ProjectedCentroid.make(child.first,relation,child.second);
  Pair<long[],ArrayModifiableDBIDs> result=null;
  int resultCardinality=-1;
  long[] childPV=child.first;
  int childCardinality=BitsUtil.cardinality(childPV);
  for (  long[] parentPV : clustersMap.keySet()) {
    int parentCardinality=BitsUtil.cardinality(parentPV);
    if (parentCardinality >= childCardinality) {
      continue;
    }
    if (resultCardinality != -1 && parentCardinality <= resultCardinality) {
      continue;
    }
    long[] pv=BitsUtil.andCMin(childPV,parentPV);
    if (pv.equals(parentPV)) {
      List<ArrayModifiableDBIDs> parentList=clustersMap.get(parentPV);
      for (      ArrayModifiableDBIDs parent : parentList) {
        NumberVector parent_centroid=ProjectedCentroid.make(parentPV,relation,parent);
        double d=weightedDistance(child_centroid,parent_centroid,parentPV);
        if (d <= 2 * epsilon) {
          result=new Pair<>(parentPV,parent);
          resultCardinality=parentCardinality;
          break;
        }
      }
    }
  }
  return result;
}

private Pair < long [ ] , ArrayModifiableDBIDs > findParent ( Relation < V > relation , Pair < long [ ] , ArrayModifiableDBIDs > child , TCustomHashMap < long [ ] , List < ArrayModifiableDBIDs > > clustersMap ) { NumberVector child_centroid = ProjectedCentroid . make ( child . first , relation , child . second ) ; Pair < long [ ] , ArrayModifiableDBIDs > result = null ; int resultCardinality = - 1 ; long [ ] childPV = child . first ; int childCardinality = BitsUtil . cardinality ( childPV ) ; for ( long [ ] parentPV : clustersMap . keySet ( ) ) { int parentCardinality = BitsUtil . cardinality ( parentPV ) ; if ( parentCardinality >= childCardinality ) { continue ; } if ( resultCardinality != - 1 && parentCardinality <= resultCardinality ) { continue ; } long [ ] pv = BitsUtil . andCMin ( childPV , parentPV ) ; if ( pv . equals ( parentPV ) ) { List < ArrayModifiableDBIDs > parentList = clustersMap . get ( parentPV ) ; for ( ArrayModifiableDBIDs parent : parentList ) { NumberVector parent_centroid = ProjectedCentroid . make ( parentPV , relation , parent ) ; double d = weightedDistance ( child_centroid , parent_centroid , parentPV ) ; if ( d <= 2 * epsilon ) { result = new Pair < > ( parentPV , parent ) ; resultCardinality = parentCardinality ; break ; } } } } return result ; }
returns the parent of the specified cluster
