Class PeakProminenceOutput


  • public class PeakProminenceOutput
    extends Object
    Represents the output of a peak prominence calculation.

    This class encapsulates the prominence values for peaks, along with their corresponding left and right bases.

    • Constructor Detail

      • PeakProminenceOutput

        public PeakProminenceOutput​(double[] prominences,
                                    int[] leftBases,
                                    int[] rightBases)
        Constructs a new PeakProminenceOutput object with the specified prominences, left bases, and right bases.
        Parameters:
        prominences - an array of doubles representing the prominence values of the peaks
        leftBases - an array of integers representing the left bases of the peaks
        rightBases - an array of integers representing the right bases of the peaks
    • Method Detail

      • getProminences

        public double[] getProminences()
        Returns the prominence values of the detected peaks.
        Returns:
        an array of doubles representing the prominence values
      • getLeftBases

        public int[] getLeftBases()
        Returns the indices of the left bases of the detected peaks.
        Returns:
        an array of integers representing the left bases
      • getRightBases

        public int[] getRightBases()
        Returns the indices of the right bases of the detected peaks.
        Returns:
        an array of integers representing the right bases
      • equals

        public boolean equals​(Object o)
        Compares this object to another object for equality.

        Two PeakProminenceOutput objects are considered equal if their prominences, left bases, and right bases arrays are all equal.

        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare to
        Returns:
        true if the objects are equal, false otherwise
      • hashCode

        public int hashCode()
        Computes the hash code for this PeakProminenceOutput object.

        The hash code is computed based on the prominences, left bases, and right bases arrays.

        Overrides:
        hashCode in class Object
        Returns:
        the hash code value