1/*2* Licensed to the Apache Software Foundation (ASF) under one or more3* contributor license agreements. See the NOTICE file distributed with4* this work for additional information regarding copyright ownership.5* The ASF licenses this file to You under the Apache License, Version 2.06* (the "License"); you may not use this file except in compliance with7* the License. You may obtain a copy of the License at8*9* http://www.apache.org/licenses/LICENSE-2.010*11* Unless required by applicable law or agreed to in writing, software12* 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 and15* limitations under the License.16*/17 18packageorg.apache.commons.math3.analysis.solvers; 19 20 21/** The kinds of solutions that a {@link BracketedUnivariateSolver22* (bracketed univariate real) root-finding algorithm} may accept as solutions.23* This basically controls whether or not under-approximations and24* over-approximations are allowed.25*26* <p>If all solutions are accepted ({@link #ANY_SIDE}), then the solution27* that the root-finding algorithm returns for a given root may be equal to the28* actual root, but it may also be an approximation that is slightly smaller29* or slightly larger than the actual root. Root-finding algorithms generally30* only guarantee that the returned solution is within the requested31* tolerances. In certain cases however, in particular for32* {@link org.apache.commons.math3.ode.events.EventHandler state events} of33* {@link org.apache.commons.math3.ode.ODEIntegrator ODE solvers}, it34* may be necessary to guarantee that a solution is returned that lies on a35* specific side the solution.</p>36*37* @see BracketedUnivariateSolver38* @since 3.039*/40publicenum AllowedSolution { 41/** There are no additional side restriction on the solutions for42* root-finding. That is, both under-approximations and over-approximations43* are allowed. So, if a function f(x) has a root at x = x0, then the44* root-finding result s may be smaller than x0, equal to x0, or greater45* than x0.46*/47 ANY_SIDE, 48 49/** Only solutions that are less than or equal to the actual root are50* acceptable as solutions for root-finding. In other words,51* over-approximations are not allowed. So, if a function f(x) has a root52* at x = x0, then the root-finding result s must satisfy s <= x0.53*/54 LEFT_SIDE, 55 56/** Only solutions that are greater than or equal to the actual root are57* acceptable as solutions for root-finding. In other words,58* under-approximations are not allowed. So, if a function f(x) has a root59* at x = x0, then the root-finding result s must satisfy s >= x0.60*/61 RIGHT_SIDE, 62 63/** Only solutions for which values are less than or equal to zero are64* acceptable as solutions for root-finding. So, if a function f(x) has65* a root at x = x0, then the root-finding result s must satisfy f(s) <= 0.66*/67 BELOW_SIDE, 68 69/** Only solutions for which values are greater than or equal to zero are70* acceptable as solutions for root-finding. So, if a function f(x) has71* a root at x = x0, then the root-finding result s must satisfy f(s) >= 0.72*/73 ABOVE_SIDE; 74 75 }