protected double ScalingFunction(int iDistance){
  return Math.exp(-Math.pow((iDistance),2.0) / (2.0 * Math.pow(CorrelationWindow,2.0)));
}

protected double ScalingFunction ( int iDistance ) { return Math . exp ( - Math . pow ( ( iDistance ) , 2.0 ) / ( 2.0 * Math . pow ( CorrelationWindow , 2.0 ) ) ) ; }
a function providing a scaling factor according to the distance between any two n - grams .
