protected ApproximationLine conservativeKnnDistanceApproximation(int k_max){
  int k_0=k_max;
  double y_1=Double.NEGATIVE_INFINITY;
  double y_kmax=Double.NEGATIVE_INFINITY;
  for (int i=0; i < getNumEntries(); i++) {
    MkCoPEntry entry=getEntry(i);
    ApproximationLine approx=entry.getConservativeKnnDistanceApproximation();
    k_0=Math.min(approx.getK_0(),k_0);
  }
  for (int i=0; i < getNumEntries(); i++) {
    MkCoPEntry entry=getEntry(i);
    ApproximationLine approx=entry.getConservativeKnnDistanceApproximation();
    double entry_y_1=approx.getValueAt(k_0);
    double entry_y_kmax=approx.getValueAt(k_max);
    if (!Double.isInfinite(entry_y_1)) {
      y_1=Math.max(entry_y_1,y_1);
    }
    if (!Double.isInfinite(entry_y_kmax)) {
      y_kmax=Math.max(entry_y_kmax,y_kmax);
    }
  }
  double m=(y_kmax - y_1) / (Math.log(k_max) - Math.log(k_0));
  double t=y_1 - m * Math.log(k_0);
  return new ApproximationLine(k_0,m,t);
}

protected ApproximationLine conservativeKnnDistanceApproximation ( int k_max ) { int k_0 = k_max ; double y_1 = Double . NEGATIVE_INFINITY ; double y_kmax = Double . NEGATIVE_INFINITY ; for ( int i = 0 ; i < getNumEntries ( ) ; i ++ ) { MkCoPEntry entry = getEntry ( i ) ; ApproximationLine approx = entry . getConservativeKnnDistanceApproximation ( ) ; k_0 = Math . min ( approx . getK_0 ( ) , k_0 ) ; } for ( int i = 0 ; i < getNumEntries ( ) ; i ++ ) { MkCoPEntry entry = getEntry ( i ) ; ApproximationLine approx = entry . getConservativeKnnDistanceApproximation ( ) ; double entry_y_1 = approx . getValueAt ( k_0 ) ; double entry_y_kmax = approx . getValueAt ( k_max ) ; if ( ! Double . isInfinite ( entry_y_1 ) ) { y_1 = Math . max ( entry_y_1 , y_1 ) ; } if ( ! Double . isInfinite ( entry_y_kmax ) ) { y_kmax = Math . max ( entry_y_kmax , y_kmax ) ; } } double m = ( y_kmax - y_1 ) / ( Math . log ( k_max ) - Math . log ( k_0 ) ) ; double t = y_1 - m * Math . log ( k_0 ) ; return new ApproximationLine ( k_0 , m , t ) ; }
determines and returns the conservative approximation for the knn distances of this node as the maximum of the conservative approximations of all entries .
