Class QuadraticStddevWeight

  • All Implemented Interfaces:
    WeightFunction

    public final class QuadraticStddevWeight
    extends java.lang.Object
    implements WeightFunction
    Quadratic weight function, scaled using the standard deviation: \( \max\{0.0, 1.0 - \frac{\text{dist}^2}{3\sigma^2} \} \).

    We needed another scaling here, we chose the cutoff point to be 3σ. If you need another value, you have to reimplement this class.

    Since:
    0.2
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static double scaling
      Scaling: at scaling * stddev the function will hit 0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getWeight​(double distance, double max, double stddev)
      Evaluate weight function at given parameters. max is ignored.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scaling

        private static final double scaling
        Scaling: at scaling * stddev the function will hit 0.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • QuadraticStddevWeight

        public QuadraticStddevWeight()
    • Method Detail

      • getWeight

        public double getWeight​(double distance,
                                double max,
                                double stddev)
        Evaluate weight function at given parameters. max is ignored.
        Specified by:
        getWeight in interface WeightFunction
        Parameters:
        distance - distance of the query point
        max - maximum distance of all included points
        stddev - standard deviation (i.e. quadratic mean / RMS) of the included points
        Returns:
        weight for the query point