code: public static WeightDistance_F32 distance( WeightType type , float param , boolean safe ) {
  
  		if( safe )
  			throw new IllegalArgumentException("Safe distributons not implemented yet");
  
  		switch( type ) {
  			case GAUSSIAN_SQ:
  				return new WeightDistanceSqGaussian_F32(param);
  
  			case UNIFORM:
  				return new WeightDistanceUniform_F32(param);
  		}
  
  		throw new IllegalArgumentException("Unknown type "+type);
  	}
docs: Creates a weight function for the provided distributions.
  
  @param type Which type of distribution should be used
  @param param Distribution parameters.  For uniform this is the maximum distance.
  Guassian its the standard deviation.
  @param safe If true it will then check the input distance to see if it matches.
  @return WeightDistance_F32