protected void initializeDataExtends(Relation<NumberVector> relation,int dim,double[] min,double[] extend){
  assert (min.length == dim && extend.length == dim);
  if (minima == null || maxima == null || minima.length == 0 || maxima.length == 0) {
    double[][] minmax=RelationUtil.computeMinMax(relation);
    final double[] dmin=minmax[0], dmax=minmax[1];
    for (int d=0; d < dim; d++) {
      min[d]=dmin[d];
      extend[d]=dmax[d] - dmin[d];
    }
    return;
  }
  if (minima.length == dim) {
    System.arraycopy(minima,0,min,0,dim);
  }
 else   if (minima.length == 1) {
    Arrays.fill(min,minima[0]);
  }
 else {
    throw new AbortException("Invalid minima specified: expected " + dim + " got minima dimensionality: "+ minima.length);
  }
  if (maxima.length == dim) {
    for (int d=0; d < dim; d++) {
      extend[d]=maxima[d] - min[d];
    }
    return;
  }
 else   if (maxima.length == 1) {
    for (int d=0; d < dim; d++) {
      extend[d]=maxima[0] - min[d];
    }
    return;
  }
 else {
    throw new AbortException("Invalid maxima specified: expected " + dim + " got maxima dimensionality: "+ maxima.length);
  }
}

protected void initializeDataExtends ( Relation < NumberVector > relation , int dim , double [ ] min , double [ ] extend ) { assert ( min . length == dim && extend . length == dim ) ; if ( minima == null || maxima == null || minima . length == 0 || maxima . length == 0 ) { double [ ] [ ] minmax = RelationUtil . computeMinMax ( relation ) ; final double [ ] dmin = minmax [ 0 ] , dmax = minmax [ 1 ] ; for ( int d = 0 ; d < dim ; d ++ ) { min [ d ] = dmin [ d ] ; extend [ d ] = dmax [ d ] - dmin [ d ] ; } return ; } if ( minima . length == dim ) { System . arraycopy ( minima , 0 , min , 0 , dim ) ; } else if ( minima . length == 1 ) { Arrays . fill ( min , minima [ 0 ] ) ; } else { throw new AbortException ( "Invalid minima specified: expected " + dim + " got minima dimensionality: " + minima . length ) ; } if ( maxima . length == dim ) { for ( int d = 0 ; d < dim ; d ++ ) { extend [ d ] = maxima [ d ] - min [ d ] ; } return ; } else if ( maxima . length == 1 ) { for ( int d = 0 ; d < dim ; d ++ ) { extend [ d ] = maxima [ 0 ] - min [ d ] ; } return ; } else { throw new AbortException ( "Invalid maxima specified: expected " + dim + " got maxima dimensionality: " + maxima . length ) ; } }
initialize the uniform sampling area .
