Package com.fa993.variations
Class LocalMaximaCC
- java.lang.Object
-
- com.fa993.variations.LocalMaximaCC
-
- All Implemented Interfaces:
LocalMaxima
public class LocalMaximaCC extends Object implements LocalMaxima
Implementation of theLocalMaxima
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 Summary
Constructors Constructor Description LocalMaximaCC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalMaximaOutput
localMaxima1D(double[] x)
Detects local maxima in a 1D signal.
-
-
-
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 interfaceLocalMaxima
- 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.
-
-