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 quadrature. 20 */ 21 public enum QuadratureType { 22 /** 23 * Trapezoidal quadrature. It's the simplest for general purpose integration. 24 */ 25 TRAPEZOIDAL, 26 27 /** 28 * Mid-point quadrature. Allows singularities at integration bounds. 29 */ 30 MID_POINT, 31 32 /** 33 * Infinity mid-point. Allows upper bound to be infinity, or lower bound negative and infinity. 34 */ 35 INFINITY_MID_POINT, 36 37 /** 38 * Lower square root mid-point. Allows a singularity of the integrand at the lower integration 39 * bound. 40 */ 41 LOWER_SQUARE_ROOT_MID_POINT, 42 43 /** 44 * Upper square root mid-point. Allows a singularity of the integrand at the upper integration 45 * bound. 46 */ 47 UPPER_SQUARE_ROOT_MID_POINT, 48 49 /** 50 * Exponential mid-point quadrature. Allows integration from a lower bound up to infinity when 51 * the integrand falls off exponentially. 52 */ 53 EXPONENTIAL_MID_POINT, 54 55 /** 56 * Double exponential rule. Allows integration when there are singularities at integration 57 * bounds with fast convergence. 58 */ 59 DOUBLE_EXPONENTIAL_RULE 60 }