@SuppressWarnings("unchecked") void materialize(){
  if (cachefill <= 0) {
    return;
  }
  double min=Double.MAX_VALUE, max=Double.MIN_VALUE;
  for (int i=0; i < cachefill; i++) {
    min=Math.min(min,cacheposs[i]);
    max=Math.max(max,cacheposs[i]);
  }
  LinearScale scale=new LinearScale(min,max);
  min=scale.getMin();
  max=scale.getMax();
  this.base=min;
  this.max=max;
  this.binsize=(max - min) / this.destsize;
  this.data=new Object[this.destsize << 1];
  for (int i=0; i < this.destsize; i++) {
    this.data[i]=makeObject();
  }
  size=destsize;
  final int end=cachefill;
  cachefill=-1;
  for (int i=0; i < end; i++) {
    putData(cacheposs[i],(T)cachevals[i]);
  }
  cacheposs=null;
  cachevals=null;
}

@ SuppressWarnings ( "unchecked" ) void materialize ( ) { if ( cachefill <= 0 ) { return ; } double min = Double . MAX_VALUE , max = Double . MIN_VALUE ; for ( int i = 0 ; i < cachefill ; i ++ ) { min = Math . min ( min , cacheposs [ i ] ) ; max = Math . max ( max , cacheposs [ i ] ) ; } LinearScale scale = new LinearScale ( min , max ) ; min = scale . getMin ( ) ; max = scale . getMax ( ) ; this . base = min ; this . max = max ; this . binsize = ( max - min ) / this . destsize ; this . data = new Object [ this . destsize << 1 ] ; for ( int i = 0 ; i < this . destsize ; i ++ ) { this . data [ i ] = makeObject ( ) ; } size = destsize ; final int end = cachefill ; cachefill = - 1 ; for ( int i = 0 ; i < end ; i ++ ) { putData ( cacheposs [ i ] , ( T ) cachevals [ i ] ) ; } cacheposs = null ; cachevals = null ; }
materialize the histogram from the cache .
