public double getShimmerLocal (double pmin, double pmax, double maximumAmplitudeFactor) {
	long numberOfPeaks = 0;
	double numerator = 0.0, denominator = 0.0;
        //Pair<Double>
	//RealPoint *points = (RealPoint *) my points -> item;
	for (int i = 1; i < points.size(); i ++) {
            double p = points.get(i).first - points.get(i - 1).first;
            if (pmin == pmax || (p >= pmin && p <= pmax)) {
                double a1 = points.get(i - 1).second, a2 = points.get(i).second;
                double amplitudeFactor = a1 > a2 ? a1 / a2 : a2 / a1;
                if (amplitudeFactor <= maximumAmplitudeFactor) {
                    numerator += Math.abs (a1 - a2);
                    numberOfPeaks ++;
                }
            }
        }
	if (numberOfPeaks < 1) return Pitch.NUMundefined;
	numerator /= numberOfPeaks;
	numberOfPeaks = 0;
	for (int i = 0; i < points.size() - 1; i ++) {
		denominator += points.get(i).second;
		numberOfPeaks ++;
	}
	denominator /= numberOfPeaks;
	if (denominator == 0.0) return Pitch.NUMundefined;
	return numerator / denominator;
    }