The R Project SVN R

Rev

Rev 36820 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36820 Rev 36990
Line 70... Line 70...
70
    error(_("invalid function value in 'optimize'"));
70
    error(_("invalid function value in 'optimize'"));
71
    return 0;/* for -Wall */
71
    return 0;/* for -Wall */
72
}
72
}
73
 
73
 
74
/* fmin(f, xmin, xmax tol) */
74
/* fmin(f, xmin, xmax tol) */
75
SEXP do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
75
SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
76
{
76
{
77
    double xmin, xmax, tol;
77
    double xmin, xmax, tol;
78
    SEXP v, res;
78
    SEXP v, res;
79
    struct callinfo info;
79
    struct callinfo info;
80
 
80
 
Line 155... Line 155...
155
    return 0;/* for -Wall */
155
    return 0;/* for -Wall */
156
 
156
 
157
}
157
}
158
 
158
 
159
/* zeroin(f, xmin, xmax, tol, maxiter) */
159
/* zeroin(f, xmin, xmax, tol, maxiter) */
160
SEXP do_zeroin(SEXP call, SEXP op, SEXP args, SEXP rho)
160
SEXP attribute_hidden do_zeroin(SEXP call, SEXP op, SEXP args, SEXP rho)
161
{
161
{
162
    double xmin, xmax, tol;
162
    double xmin, xmax, tol;
163
    int iter;
163
    int iter;
164
    SEXP v, res;
164
    SEXP v, res;
165
    struct callinfo info;
165
    struct callinfo info;
Line 521... Line 521...
521
    Rprintf("\n");
521
    Rprintf("\n");
522
}
522
}
523
 
523
 
524
/* NOTE: The actual Dennis-Schnabel algorithm `optif9' is in ../appl/uncmin.c */
524
/* NOTE: The actual Dennis-Schnabel algorithm `optif9' is in ../appl/uncmin.c */
525
 
525
 
526
SEXP do_nlm(SEXP call, SEXP op, SEXP args, SEXP rho)
526
SEXP attribute_hidden do_nlm(SEXP call, SEXP op, SEXP args, SEXP rho)
527
{
527
{
528
    SEXP value, names, v, R_gradientSymbol, R_hessianSymbol;
528
    SEXP value, names, v, R_gradientSymbol, R_hessianSymbol;
529
 
529
 
530
    double *x, *typsiz, fscale, gradtl, stepmx,
530
    double *x, *typsiz, fscale, gradtl, stepmx,
531
	steptol, *xpls, *gpls, fpls, *a, *wrk, dlt;
531
	steptol, *xpls, *gpls, fpls, *a, *wrk, dlt;