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