View Javadoc
1   /*
2    * Copyright (C) 2023 Alberto Irurueta Carro (alberto@irurueta.com)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.irurueta.numerical.integration;
17  
18  /**
19   * Indicates type of integrator.
20   */
21  public enum IntegratorType {
22      /**
23       * Quadrature integrator. Suitable for general purpose integrations when no prior knowledge
24       * of the integrand is known or the function is not very smooth (i.e. linearly interpolated).
25       * Has slow convergence and might not converge at all if required accuracy is too stringent.
26       */
27      QUADRATURE,
28  
29      /**
30       * Simpson integrator. Suitable when assumptions can be made about integrand smoothness.
31       * In general Simpson method will be more efficient (i.e. requires fewer function evaluations)
32       * when the function to be integrated has a finite fourth derivative (i.e. a continuous third
33       * derivative).
34       */
35      SIMPSON,
36  
37      /**
38       * Romberg integrator. Suitable when integrand is sufficiently smooth (e.g. analytic), and
39       * integrated over intervals that contain no singularities, and where the endpoints are also
40       * non-singular. In such circumstances, Romberg method is more efficient than Simpson's one.
41       */
42      ROMBERG
43  }