MCPcopy Create free account
hub / github.com/davisking/dlib / rescue_

Method rescue_

dlib/optimization/optimization_bobyqa.h:2022–2634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2020
2021 template <typename funct>
2022 void rescue_ (
2023 const funct& calfun,
2024 const integer n,
2025 const integer npt,
2026 const doublereal *xl,
2027 const doublereal *xu,
2028 const integer maxfun,
2029 doublereal *xbase,
2030 doublereal *xpt,
2031 doublereal *fval,
2032 doublereal *xopt,
2033 doublereal *gopt,
2034 doublereal *hq,
2035 doublereal *pq,
2036 doublereal *bmat,
2037 doublereal *zmat,
2038 const integer ndim,
2039 doublereal *sl,
2040 doublereal *su,
2041 integer& nf,
2042 const doublereal delta,
2043 integer& kopt,
2044 doublereal *vlag,
2045 doublereal * ptsaux,
2046 doublereal *ptsid,
2047 doublereal *w
2048 ) const
2049 {
2050 /* System generated locals */
2051 integer xpt_dim1, xpt_offset, bmat_dim1, bmat_offset, zmat_dim1,
2052 zmat_offset, i__1, i__2, i__3;
2053 doublereal d__1, d__2, d__3, d__4;
2054
2055
2056 /* Local variables */
2057 doublereal f;
2058 integer i__, j, k, ih, jp, ip, iq, np, iw;
2059 doublereal xp = 0, xq = 0, den = 0;
2060 integer ihp = 0;
2061 doublereal one;
2062 integer ihq, jpn, kpt;
2063 doublereal sum = 0, diff = 0, half = 0, beta = 0;
2064 integer kold;
2065 doublereal winc;
2066 integer nrem, knew;
2067 doublereal temp, bsum;
2068 integer nptm;
2069 doublereal zero = 0, hdiag = 0, fbase = 0, sfrac = 0, denom = 0, vquad = 0, sumpq = 0;
2070 doublereal dsqmin, distsq, vlmxsq;
2071
2072
2073
2074 /* The arguments N, NPT, XL, XU, IPRINT, MAXFUN, XBASE, XPT, FVAL, XOPT, */
2075 /* GOPT, HQ, PQ, BMAT, ZMAT, NDIM, SL and SU have the same meanings as */
2076 /* the corresponding arguments of BOBYQB on the entry to RESCUE. */
2077 /* NF is maintained as the number of calls of CALFUN so far, except that */
2078 /* NF is set to -1 if the value of MAXFUN prevents further progress. */
2079 /* KOPT is maintained so that FVAL(KOPT) is the least calculated function */

Callers

nothing calls this directly

Calls 5

absFunction · 0.85
maxFunction · 0.50
minFunction · 0.50
sqrtFunction · 0.50
matFunction · 0.50

Tested by

no test coverage detected