ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Refine an initial input interval such that the final returned interval is guaranteed to contain the minimum of the user-specified input function.
More...
Refine an initial input interval such that the final returned interval is guaranteed to contain the minimum of the user-specified input function.
Given two initial input values [xlow, xupp]
representing the best-guess interval to hopefully contain the minimum of the input function, compute and return the refined interval and an interior point xmin
within the interval such that the triple [xlow, xmin, xupp]
are guaranteed to pass through a convex parabola.
In addition, return the function values at the final computed triplet.
The output refined interval [xlow, xupp]
is guaranteed to contain a minimum of the user-specified input function.
xmin
is not the location of a function minimum.xlow < xmin .and. xmin < xupp
.[in] | getFunc | : The scalar function be minimized.
getFunc , function getFunc(x) result(func)
real(RKG), intent(in) :: x
real(RKG) :: func
end function
RKG can refer to any real type kind parameter any supported by the processor (e.g., RK, RK32, RK64, or RK128) supported by the library. |
[in,out] | niter | : The input/output positive scalar of type integer of default kind IK containing the maximum number of allowed iterations in the algorithm in search of the bracket.On output,
niter is almost twice the maximum allowed number of calls to the user-specified input function.The reasonable choice can be 1000 . |
[out] | xmin | : The output scalar of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128), containing the abscissa corresponding to the minimum function value among the triplet [xlow, xmin, xupp] . |
[in,out] | xlow | : The input/output scalar of the same type and kind as the output argument xmin , containing the lower bound of the search interval for the function minimum abscissa.The condition xlow < xmin .and. getFunc(xmin) < getFunc(xlow) must hold for the corresponding input arguments. |
[in,out] | xupp | : The input/output scalar of the same type and kind as the output argument xmin , containing the upper bound of the search interval for the function minimum abscissa.The condition xmin < xupp .and. getFunc(xmin) < getFunc(xupp) must hold for the corresponding input arguments. |
[out] | fmin | : The output scalar of the same type and kind as the output argument xmin , containing the user-specified function value at xmin . |
[out] | flow | : The output scalar of the same type and kind as the output argument xmin , containing the user-specified function value at the final refined xlow .(optional.) |
[out] | fupp | : The output scalar of the same type and kind as the output argument xmin , containing the user-specified function value at the final refined xupp .(optional.) |
Possible calling interfaces ⛓
0 < niter
must hold for the corresponding input arguments.xlow < xupp
must hold for the corresponding input arguments.getFunc()
must be convex (with positive second derivative) at least in one interval within its domain, otherwise the procedure will enter a semi-infinite loop in search of the minimum.impure
.recursive
.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
Definition at line 605 of file pm_optimization.F90.