@Override public void increment(double coord,float val){
  int bin=getBinNr(coord);
  if (bin < 0) {
    if (size - bin > data.length) {
      float[] tmpdata=new float[growSize(data.length,size - bin)];
      System.arraycopy(data,0,tmpdata,-bin,size);
      data=tmpdata;
    }
 else {
      System.arraycopy(data,0,data,-bin,size);
      Arrays.fill(data,0,-bin,(float)0);
    }
    data[0]=val;
    assert (data.length >= size - bin);
    offset-=bin;
    size-=bin;
  }
 else   if (bin >= data.length) {
    float[] tmpdata=new float[growSize(data.length,bin + 1)];
    System.arraycopy(data,0,tmpdata,0,size);
    tmpdata[bin]=val;
    data=tmpdata;
    size=bin + 1;
    max=Double.MAX_VALUE;
  }
 else {
    if (bin >= size) {
      size=bin + 1;
    }
    data[bin]+=val;
  }
}

@ Override public void increment ( double coord , float val ) { int bin = getBinNr ( coord ) ; if ( bin < 0 ) { if ( size - bin > data . length ) { float [ ] tmpdata = new float [ growSize ( data . length , size - bin ) ] ; System . arraycopy ( data , 0 , tmpdata , - bin , size ) ; data = tmpdata ; } else { System . arraycopy ( data , 0 , data , - bin , size ) ; Arrays . fill ( data , 0 , - bin , ( float ) 0 ) ; } data [ 0 ] = val ; assert ( data . length >= size - bin ) ; offset -= bin ; size -= bin ; } else if ( bin >= data . length ) { float [ ] tmpdata = new float [ growSize ( data . length , bin + 1 ) ] ; System . arraycopy ( data , 0 , tmpdata , 0 , size ) ; tmpdata [ bin ] = val ; data = tmpdata ; size = bin + 1 ; max = Double . MAX_VALUE ; } else { if ( bin >= size ) { size = bin + 1 ; } data [ bin ] += val ; } }
increment the value of a bin .
