SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.integration.univariate.riemann
Enum EulerMaclaurin.NewtonCotesType

java.lang.Object
  extended by java.lang.Enum<EulerMaclaurin.NewtonCotesType>
      extended by com.numericalmethod.suanshu.analysis.integration.univariate.riemann.EulerMaclaurin.NewtonCotesType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EulerMaclaurin.NewtonCotesType>
Enclosing class:
EulerMaclaurin

public static enum EulerMaclaurin.NewtonCotesType
extends java.lang.Enum<EulerMaclaurin.NewtonCotesType>

Newton-Cotes methods can be classified into two categories: OPEN and CLOSED.


Enum Constant Summary
CLOSED
          The first and the last terms in the Euler-Maclaurin formula are included in the sum.
OPEN
          The first and the last terms in the Euler-Maclaurin formula are not included in the sum.
 
Method Summary
static EulerMaclaurin.NewtonCotesType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EulerMaclaurin.NewtonCotesType[] 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

CLOSED

public static final EulerMaclaurin.NewtonCotesType 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 EulerMaclaurin.NewtonCotesType 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 EulerMaclaurin.NewtonCotesType[] 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 (EulerMaclaurin.NewtonCotesType c : EulerMaclaurin.NewtonCotesType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EulerMaclaurin.NewtonCotesType 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

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.