Enum NewtonCotes.Type

    • Enum Constant Detail

      • CLOSED

        public static final NewtonCotes.Type CLOSED
        The first and the last terms in the Euler-Maclaurin formula are included in the sum. They are: 1/2 * f(x0), and 1/2 * f(xn).
      • OPEN

        public static final NewtonCotes.Type OPEN
        The first and the last terms in the Euler-Maclaurin formula are not included in the sum. This is to avoid computing for end points where f(x) cannot be evaluated. Instead, we use the mid-point to make the first rough estimate of the integral.
    • Method Detail

      • values

        public static NewtonCotes.Type[] 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 (NewtonCotes.Type c : NewtonCotes.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NewtonCotes.Type valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null