private Pair<Double,Double> calculateMinMaxFast(){
  debug("ValueSourceData: calculateMinMaxFast()");
  Pair<Double,Double> minMaxValues=new Pair<Double,Double>(Double.POSITIVE_INFINITY,Double.NEGATIVE_INFINITY);
  GroupCellSeriesData dataForAllGroupCells=getSeriesDataForAllGroupCells();
  Set<Double> yValues=dataForAllGroupCells.getDistinctValues(SeriesUsageType.MAIN_SERIES,PlotDimension.VALUE);
  for (  Double value : yValues) {
    if (value < minMaxValues.getFirst()) {
      minMaxValues.setFirst(value);
    }
    if (value > minMaxValues.getSecond()) {
      minMaxValues.setSecond(value);
    }
  }
  if (yValues.isEmpty()) {
    minMaxValues.setFirst(Double.NEGATIVE_INFINITY);
    minMaxValues.setSecond(Double.POSITIVE_INFINITY);
  }
  debug("min: " + minMaxValues.getFirst());
  debug("max: " + minMaxValues.getSecond());
  return minMaxValues;
}

private Pair < Double , Double > calculateMinMaxFast ( ) { debug ( "ValueSourceData: calculateMinMaxFast()" ) ; Pair < Double , Double > minMaxValues = new Pair < Double , Double > ( Double . POSITIVE_INFINITY , Double . NEGATIVE_INFINITY ) ; GroupCellSeriesData dataForAllGroupCells = getSeriesDataForAllGroupCells ( ) ; Set < Double > yValues = dataForAllGroupCells . getDistinctValues ( SeriesUsageType . MAIN_SERIES , PlotDimension . VALUE ) ; for ( Double value : yValues ) { if ( value < minMaxValues . getFirst ( ) ) { minMaxValues . setFirst ( value ) ; } if ( value > minMaxValues . getSecond ( ) ) { minMaxValues . setSecond ( value ) ; } } if ( yValues . isEmpty ( ) ) { minMaxValues . setFirst ( Double . NEGATIVE_INFINITY ) ; minMaxValues . setSecond ( Double . POSITIVE_INFINITY ) ; } debug ( "min: " + minMaxValues . getFirst ( ) ) ; debug ( "max: " + minMaxValues . getSecond ( ) ) ; return minMaxValues ; }
fast calculation of min / max if no utility is set . the first value of the pair will hold the min value , the second value will hold the max value .
