private double[] determineMinMaxDistance(Relation<ParameterizationFunction> relation,int dimensionality){
  double[] min=new double[dimensionality - 1];
  double[] max=new double[dimensionality - 1];
  Arrays.fill(max,Math.PI);
  HyperBoundingBox box=new HyperBoundingBox(min,max);
  double d_min=Double.POSITIVE_INFINITY;
  double d_max=Double.NEGATIVE_INFINITY;
  for (DBIDIter iditer=relation.iterDBIDs(); iditer.valid(); iditer.advance()) {
    ParameterizationFunction f=relation.get(iditer);
    HyperBoundingBox minMax=f.determineAlphaMinMax(box);
    double f_min=f.function(SpatialUtil.getMin(minMax));
    double f_max=f.function(SpatialUtil.getMax(minMax));
    d_min=Math.min(d_min,f_min);
    d_max=Math.max(d_max,f_max);
  }
  return new double[]{d_min,d_max};
}

private double [ ] determineMinMaxDistance ( Relation < ParameterizationFunction > relation , int dimensionality ) { double [ ] min = new double [ dimensionality - 1 ] ; double [ ] max = new double [ dimensionality - 1 ] ; Arrays . fill ( max , Math . PI ) ; HyperBoundingBox box = new HyperBoundingBox ( min , max ) ; double d_min = Double . POSITIVE_INFINITY ; double d_max = Double . NEGATIVE_INFINITY ; for ( DBIDIter iditer = relation . iterDBIDs ( ) ; iditer . valid ( ) ; iditer . advance ( ) ) { ParameterizationFunction f = relation . get ( iditer ) ; HyperBoundingBox minMax = f . determineAlphaMinMax ( box ) ; double f_min = f . function ( SpatialUtil . getMin ( minMax ) ) ; double f_max = f . function ( SpatialUtil . getMax ( minMax ) ) ; d_min = Math . min ( d_min , f_min ) ; d_max = Math . max ( d_max , f_max ) ; } return new double [ ] { d_min , d_max } ; }
determines the minimum and maximum function value of all parameterization functions stored in the specified database .
