Class SelectByProperty


  • public class SelectByProperty
    extends Object
    Utility class for evaluating properties of peaks against defined intervals. This class provides methods to filter peaks based on their properties conforming to specified minimum and maximum boundary conditions. These boundaries can be scalars or arrays.
    • Constructor Detail

      • SelectByProperty

        public SelectByProperty()
    • Method Detail

      • call

        public static boolean[] call​(int[] peakProperties,
                                     Either.OfTwo<Double,​double[]> pmin,
                                     Either.OfTwo<Double,​double[]> pmax)
        Evaluates which peaks conform to a specified interval based on their properties. The interval is defined by optional minimum and maximum boundaries.
        Parameters:
        peakProperties - an array representing the properties of each peak.
        pmin - the lower boundary of the interval. This can be:
        • A scalar value applied uniformly to all peaks.
        • An array of values, where each corresponds to a specific peak.
        • Null, indicating no lower boundary is applied.
        pmax - the upper boundary of the interval. This can be:
        • A scalar value applied uniformly to all peaks.
        • An array of values, where each corresponds to a specific peak.
        • Null, indicating no upper boundary is applied.
        Returns:
        a boolean array where each element evaluates to true if the corresponding peak conforms to the interval, and false otherwise.
        Throws:
        IllegalArgumentException - if pmin or pmax is an array of a different length than peakProperties.
      • call

        public static boolean[] call​(double[] peakProperties,
                                     Either.OfTwo<Double,​double[]> pmin,
                                     Either.OfTwo<Double,​double[]> pmax)
        Evaluates which peaks conform to a specified interval based on their properties. The interval is defined by optional minimum and maximum boundaries. This method operates on properties represented as double arrays.
        Parameters:
        peakProperties - an array of double values representing the properties of each peak.
        pmin - the lower boundary of the interval. This can be:
        • A scalar value applied uniformly to all peaks.
        • An array of values, where each corresponds to a specific peak.
        • Null, indicating no lower boundary is applied.
        pmax - the upper boundary of the interval. This can be:
        • A scalar value applied uniformly to all peaks.
        • An array of values, where each corresponds to a specific peak.
        • Null, indicating no upper boundary is applied.
        Returns:
        a boolean array where each element evaluates to true if the corresponding peak conforms to the interval, and false otherwise.
        Throws:
        IllegalArgumentException - if pmin or pmax is an array of a different length than peakProperties.