Class LocalMaximaCC

  • All Implemented Interfaces:
    LocalMaxima

    public class LocalMaximaCC
    extends Object
    implements LocalMaxima
    Implementation of the LocalMaxima interface using a direct translation of the numpy-based algorithm for finding local maxima in a 1D signal. Generated By CodeConvert This implementation determines the indices of local maxima along with the left and right edges of each peak in the input array.
    See Also:
    LocalMaxima source
    • Constructor Detail

      • LocalMaximaCC

        public LocalMaximaCC()
    • Method Detail

      • localMaxima1D

        public LocalMaximaOutput localMaxima1D​(double[] x)
        Detects local maxima in a 1D signal. This method iterates through the input array to identify points where the signal value at a specific index is greater than its neighbors, thereby identifying local maxima. The midpoints, left edges, and right edges of each peak are computed and returned.
        Specified by:
        localMaxima1D in interface LocalMaxima
        Parameters:
        x - The input signal array.
        Returns:
        A LocalMaximaOutput object containing: - `midpoints`: The indices of the midpoints of the detected peaks. - `leftEdges`: The indices of the left edges of each peak. - `rightEdges`: The indices of the right edges of each peak.
        Throws:
        IllegalArgumentException - If the input array is null.