ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return the minimum value and the corresponding abscissa xmin
of the input 1-dimensional function isolated to a fractional precision of about tol
using the Brent method.
More...
Generate and return the minimum value and the corresponding abscissa xmin
of the input 1-dimensional function isolated to a fractional precision of about tol
using the Brent method.
[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] | xlow | : The input 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.(optional, default = 0.1 . This requires 0.1 to be within the support of getFunc() ) |
[in] | xupp | : The input 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.(optional, default = 0.9 . This requires 0.9 to be within the support of getFunc() ) |
[out] | fmin | : The output scalar of the same type and kind as the output argument xmin .On output, it contains the function value at the identified minimum xmin .(optional. If missing, the function value at the minimum will not be returned.) |
[in] | tol | : The input positive scalar of the same type and kind as the output argument xmin , containing the fractional minimum distance that a new function evaluation point xmin can have from any previously evaluated point.Values smaller than the suggestion below might lead to algorithm failure due to roundoff error accumulation. (optional. default = sqrt(epsilon(xmin)) .) |
[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 minimum.On output,
niter is effectively the number of calls to the user-specified input function.(optional. default = int(100 * precision(xmin) / 53.) .) |
xmin
: The output scalar of,
containing the inferred abscissa at the function minimum, if the algorithm succeeds.
Possible calling interfaces ⛓
0 < niter
must hold for the corresponding input arguments.0 < tol
must hold for the corresponding input arguments.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 768 of file pm_optimization.F90.