Enum Transformer

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MAX
      Transformer computing transformed = max(+Precision.SAFE_MIN, -g, +g).
      MIN
      Transformer computing transformed = min(-Precision.SAFE_MIN, -g, +g).
      MINUS
      Transformer computing transformed = -g.
      PLUS
      Transformer computing transformed = g.
      UNINITIALIZED
      Transformer computing transformed = 0.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Transformer()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract double transformed​(double g)
      Transform value of function g.
      static Transformer valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Transformer[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • UNINITIALIZED

        public static final Transformer UNINITIALIZED
        Transformer computing transformed = 0.

        This transformer is used when we initialize the filter, until we get at least one non-zero value to select the proper transformer.

      • PLUS

        public static final Transformer PLUS
        Transformer computing transformed = g.

        When this transformer is applied, the roots of the original function are preserved, with the same increasing/decreasing status.

      • MINUS

        public static final Transformer MINUS
        Transformer computing transformed = -g.

        When this transformer is applied, the roots of the original function are preserved, with reversed increasing/decreasing status.

      • MIN

        public static final Transformer MIN
        Transformer computing transformed = min(-Precision.SAFE_MIN, -g, +g).

        When this transformer is applied, the transformed function is guaranteed to be always strictly negative (i.e. there are no roots).

      • MAX

        public static final Transformer MAX
        Transformer computing transformed = max(+Precision.SAFE_MIN, -g, +g).

        When this transformer is applied, the transformed function is guaranteed to be always strictly positive (i.e. there are no roots).

    • Constructor Detail

      • Transformer

        private Transformer()
    • Method Detail

      • values

        public static Transformer[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Transformer c : Transformer.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Transformer valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • transformed

        protected abstract double transformed​(double g)
        Transform value of function g.
        Parameters:
        g - raw value of function g
        Returns:
        transformed value of function g