double *simi, double *datmat, double *a, double *vsig, double *veta,
double *sigbar, double *dx, double *w, int *iact, cobyla_function *calcfc,
func_wrap_state *state);
double *simi, double *datmat, double *a, double *vsig, double *veta,
double *sigbar, double *dx, double *w, int *iact, cobyla_function *calcfc,
func_wrap_state *state);
-static void trstlp(int *n, int *m, double *a, double *b, double *rho,
+static nlopt_result trstlp(int *n, int *m, double *a, double *b, double *rho,
double *dx, int *ifull, int *iact, double *z__, double *zdota, double *vmultc,
double *sdirn, double *dxnew, double *vmultd);
double *dx, int *ifull, int *iact, double *z__, double *zdota, double *vmultc,
double *sdirn, double *dxnew, double *vmultd);
- trstlp(n, m, &a[a_offset], &con[1], &rho, &dx[1], &ifull, &iact[1], &w[
+ rc = trstlp(n, m, &a[a_offset], &con[1], &rho, &dx[1], &ifull, &iact[1], &w[
iz], &w[izdota], &w[ivmc], &w[isdirn], &w[idxnew], &w[ivmd]);
iz], &w[izdota], &w[ivmc], &w[isdirn], &w[idxnew], &w[ivmd]);
#if ENFORCE_BOUNDS
/* SGJ: since the bound constraints are linear, we should never get
a dx that lies outside the [lb,ub] constraints here, but we'll
#if ENFORCE_BOUNDS
/* SGJ: since the bound constraints are linear, we should never get
a dx that lies outside the [lb,ub] constraints here, but we'll
-static void trstlp(int *n, int *m, double *a,
+static nlopt_result trstlp(int *n, int *m, double *a,
double *b, double *rho, double *dx, int *ifull,
int *iact, double *z__, double *zdota, double *vmultc,
double *sdirn, double *dxnew, double *vmultd)
double *b, double *rho, double *dx, int *ifull,
int *iact, double *z__, double *zdota, double *vmultc,
double *sdirn, double *dxnew, double *vmultd)
/* Set DXNEW to the new variables if STEP is the steplength, and reduce */
/* RESMAX to the corresponding maximum residual if stage one is being done. */
/* Because DXNEW will be changed during the calculation of some Lagrange */
/* Set DXNEW to the new variables if STEP is the steplength, and reduce */
/* RESMAX to the corresponding maximum residual if stage one is being done. */
/* Because DXNEW will be changed during the calculation of some Lagrange */