Class SelectByPeakDistance


  • public class SelectByPeakDistance
    extends Object
    Utility class for selecting peaks based on a specified minimum distance condition. Peaks that do not meet the distance condition relative to higher-priority peaks are excluded.
    • Constructor Detail

      • SelectByPeakDistance

        public SelectByPeakDistance()
    • Method Detail

      • call

        public static boolean[] call​(int[] peaks,
                                     double[] priority,
                                     double distance)
        Evaluates which peaks fulfill the minimum distance condition based on their priorities. Peaks are sorted by priority, and those that violate the distance constraint relative to higher-priority peaks are excluded.
        Parameters:
        peaks - an array of indices representing the positions of the peaks.
        priority - an array of priority values corresponding to each peak. A higher value indicates a higher priority for that peak.
        distance - the minimum distance that peaks must be spaced apart.
        Returns:
        a boolean array where true indicates the corresponding peak fulfills the distance condition and should be kept.