package cs437.som.membership;

import cs437.som.NeighborhoodMembershipFunction;

public class ExponentialNeighborhoodMembershipFunction implements NeighborhoodMembershipFunction {
    @Override
    public double neighborhoodMembership(double distance, double width) {
        if (distance < width)
            return Math.exp(-(width - distance) / width);
        else
            return 0;
    }
}

@@ -74,16 +74,299 @@
 ction;%0A%0A
+/**%0A * Exponential neighborhood membership strategy.%0A *%0A * This membership function follows the equation:%0A * %3Cpre%3E%0A *     e%5E%7B-%5Cfrac%7Bw - %5Cdelta%7D%7B%5Cw%7D%7D%0A * where%0A *     w       is the neighborhood width%0A *     %5Cdelta  is the distance from the neuron in question to the BMU%0A * %3C/pre%3E%0A */%0A
 public c

Document ExponentialNeighborhoodMembershipFunction.