Fixed too stringent interval check in Brent solver:
initial guess is now allowed to be at either interval end JIRA: MATH-347 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@917668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46abbb40e1
commit
57c45aca3d
|
@ -100,7 +100,11 @@ public class BrentSolver extends UnivariateRealSolverImpl {
|
||||||
throws MaxIterationsExceededException, FunctionEvaluationException {
|
throws MaxIterationsExceededException, FunctionEvaluationException {
|
||||||
|
|
||||||
clearResult();
|
clearResult();
|
||||||
verifySequence(min, initial, max);
|
if ((initial < min) || (initial > max)) {
|
||||||
|
throw MathRuntimeException.createIllegalArgumentException(
|
||||||
|
"invalid interval, initial value parameters: lower={0}, initial={1}, upper={2}",
|
||||||
|
min, initial, max);
|
||||||
|
}
|
||||||
|
|
||||||
// return the initial guess if it is good enough
|
// return the initial guess if it is good enough
|
||||||
double yInitial = f.value(initial);
|
double yInitial = f.value(initial);
|
||||||
|
|
|
@ -39,6 +39,10 @@ The <action> type attribute can be add,update,fix,remove.
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="2.1" date="TBD" description="TBD">
|
<release version="2.1" date="TBD" description="TBD">
|
||||||
|
<action dev="luc" type="fix" issue="MATH-347" >
|
||||||
|
Fixed too stringent interval check in Brent solver: initial guess is now
|
||||||
|
allowed to be at either interval end
|
||||||
|
</action>
|
||||||
<action dev="luc" type="add" >
|
<action dev="luc" type="add" >
|
||||||
Added a way to compute both the final state in an Initial Value Problem (IVP)
|
Added a way to compute both the final state in an Initial Value Problem (IVP)
|
||||||
for Ordinary Differential Equations (ODE) and its derivatives with respect to
|
for Ordinary Differential Equations (ODE) and its derivatives with respect to
|
||||||
|
|
Loading…
Reference in New Issue