Class MaxSelector


  • public class MaxSelector
    extends Selector
    Selector for max value.

    This selector considers Double.NaN values correspond to non-initialized data that should be ignored rather than selected.

    Author:
    Luc Maisonobe
    See Also:
    MinSelector
    • Method Detail

      • getInstance

        public static MaxSelector getInstance()
        Get the unique instance.
        Returns:
        unique instance of the min selector.
      • selectFirst

        public boolean selectFirst​(double v1,
                                   double v2)
        Check if first value should be selected.
        Specified by:
        selectFirst in class Selector
        Parameters:
        v1 - first value
        v2 - second value
        Returns:
        true if v1 is higher than v2, or if v2 is Double.NaN