Class LocalMaximaJIU

  • All Implemented Interfaces:
    LocalMaxima

    public class LocalMaximaJIU
    extends Object
    implements LocalMaxima
    Implementation of the LocalMaxima interface using a method adapted from the scipy library's numpy-based peak-finding utility.

    This class provides functionality to find local maxima in a 1-dimensional array of points. It identifies the peaks, their midpoints, and their left and right edges.

    Generated Using JavaInUse
    See Also:
    Original LocalMaxima source
    • Constructor Detail

      • LocalMaximaJIU

        public LocalMaximaJIU()
    • Method Detail

      • localMaxima1D

        public LocalMaximaOutput localMaxima1D​(double[] x)
        Finds local maxima in a 1-dimensional array of points.

        This method examines a given array of doubles and identifies the indices of local peaks. A peak is defined as a value that is greater than its neighbors. For plateaus (flat regions), the peak is considered valid if it transitions to lower values on both sides.

        Specified by:
        localMaxima1D in interface LocalMaxima
        Parameters:
        x - an array of doubles representing 1-dimensional data points to find peaks for
        Returns:
        a LocalMaximaOutput containing:
        • Array of midpoints of peaks
        • Array of left edges of peaks
        • Array of right edges of peaks
        See Also:
        LocalMaxima source