@ Override public double getWeight ( double distance , double max , double stddev ) { if ( max <= 0 ) { return 1.0 ; } double relativedistance = distance / max ; // -2.303 is log(.1) to suit the intended range of 1.0-0.1 return FastMath . exp ( - 2.3025850929940455 * relativedistance * relativedistance ) ; }
Get Gaussian weight . stddev is not used scaled using max .