1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * https://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /* 19 * This is not the original file distributed by the Apache Software Foundation 20 * It has been modified by the Hipparchus project 21 */ 22 23 package org.hipparchus.analysis.solvers; 24 25 26 /** 27 * Implements the <em>Illinois</em> method for root-finding (approximating 28 * a zero of a univariate real function). It is a modified 29 * {@link RegulaFalsiSolver <em>Regula Falsi</em>} method. 30 * 31 * <p>Like the <em>Regula Falsi</em> method, convergence is guaranteed by 32 * maintaining a bracketed solution. The <em>Illinois</em> method however, 33 * should converge much faster than the original <em>Regula Falsi</em> 34 * method. Furthermore, this implementation of the <em>Illinois</em> method 35 * should not suffer from the same implementation issues as the <em>Regula 36 * Falsi</em> method, which may fail to convergence in certain cases.</p> 37 * 38 * <p>The <em>Illinois</em> method assumes that the function is continuous, 39 * but not necessarily smooth.</p> 40 * 41 * <p>Implementation based on the following article: M. Dowell and P. Jarratt, 42 * <em>A modified regula falsi method for computing the root of an 43 * equation</em>, BIT Numerical Mathematics, volume 11, number 2, 44 * pages 168-174, Springer, 1971.</p> 45 * 46 */ 47 public class IllinoisSolver extends BaseSecantSolver { 48 49 /** Construct a solver with default accuracy (1e-6). */ 50 public IllinoisSolver() { 51 super(DEFAULT_ABSOLUTE_ACCURACY, Method.ILLINOIS); 52 } 53 54 /** 55 * Construct a solver. 56 * 57 * @param absoluteAccuracy Absolute accuracy. 58 */ 59 public IllinoisSolver(final double absoluteAccuracy) { 60 super(absoluteAccuracy, Method.ILLINOIS); 61 } 62 63 /** 64 * Construct a solver. 65 * 66 * @param relativeAccuracy Relative accuracy. 67 * @param absoluteAccuracy Absolute accuracy. 68 */ 69 public IllinoisSolver(final double relativeAccuracy, 70 final double absoluteAccuracy) { 71 super(relativeAccuracy, absoluteAccuracy, Method.ILLINOIS); 72 } 73 74 /** 75 * Construct a solver. 76 * 77 * @param relativeAccuracy Relative accuracy. 78 * @param absoluteAccuracy Absolute accuracy. 79 * @param functionValueAccuracy Maximum function value error. 80 */ 81 public IllinoisSolver(final double relativeAccuracy, 82 final double absoluteAccuracy, 83 final double functionValueAccuracy) { 84 super(relativeAccuracy, absoluteAccuracy, functionValueAccuracy, Method.ILLINOIS); 85 } 86 }