The R Project SVN R

Rev

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

Rev 33297 Rev 33387
Line 519... Line 519...
519
    X = vect(n);
519
    X = vect(n);
520
    c = vect(n);
520
    c = vect(n);
521
    B = Lmatrix(n);
521
    B = Lmatrix(n);
522
    f = fminfn(n0, b, ex);
522
    f = fminfn(n0, b, ex);
523
    if (!R_FINITE(f))
523
    if (!R_FINITE(f))
524
	error(_("initial value in vmmin is not finite"));
524
	error(_("initial value in 'vmmin' is not finite"));
525
    if (trace) Rprintf("initial  value %f \n", f);
525
    if (trace) Rprintf("initial  value %f \n", f);
526
    *Fmin = f;
526
    *Fmin = f;
527
    funcount = gradcount = 1;
527
    funcount = gradcount = 1;
528
    fmingr(n0, b, g, ex);
528
    fmingr(n0, b, g, ex);
529
    iter++;
529
    iter++;
Line 1041... Line 1041...
1041
	       tr, lsave, isave, dsave);
1041
	       tr, lsave, isave, dsave);
1042
/*	Rprintf("in lbfgsb - %s\n", task);*/
1042
/*	Rprintf("in lbfgsb - %s\n", task);*/
1043
	if (strncmp(task, "FG", 2) == 0) {
1043
	if (strncmp(task, "FG", 2) == 0) {
1044
	    f = fminfn(n, x, ex);
1044
	    f = fminfn(n, x, ex);
1045
	    if (!R_FINITE(f))
1045
	    if (!R_FINITE(f))
1046
		error(_("L-BFGS-B needs finite values of fn"));
1046
		error(_("L-BFGS-B needs finite values of 'fn'"));
1047
	    fmingr(n, x, g, ex);
1047
	    fmingr(n, x, g, ex);
1048
	} else if (strncmp(task, "NEW_X", 5) == 0) {
1048
	} else if (strncmp(task, "NEW_X", 5) == 0) {
1049
	    if(trace == 1 && (iter % nREPORT == 0)) {
1049
	    if(trace == 1 && (iter % nREPORT == 0)) {
1050
		Rprintf("iter %4d value %f\n", iter, f);
1050
		Rprintf("iter %4d value %f\n", iter, f);
1051
	    }
1051
	    }