Displaying 3 results from an estimated 3 matches for "intol".
Did you mean:
intel
2006 Mar 29
1
calling R's optimization routines from C
...data->n;
double mu = par[0];
double sum = 0.0;
int i;
for (i=0; i<n; i++) {
double t = X[i] - mu;
sum += t*t;
}
return sum;
}
int main(void)
{
int i,n=1, trace=1, maxit=100, fail, fncount;
double *par, abstol=0.0001, intol=.0001, alpha=1, beta=.5, gamma=2, *xin, *x,
Fmin;
MyData ex;
par=malloc(n*sizeof(double));
xin=malloc(n*sizeof(double));
x=malloc(n*sizeof(double));
par[0]=5;
xin[0]=5;
ex.n=5;
ex.X=malloc(ex.n*sizeof(double));
for(i=0;i<ex.n;i++) ex.X[i]=i;
nmmin(n,xin,x,&Fmin,m...
2008 Oct 31
0
R help for invoking nmmin()
...<< qnorm(0.7, 0.0, 1.0, 0, 0) << endl;
int n = 5;
double *dpar, *opar;
int fncount, fail;
dpar = new double [n];
opar = new double [n];
dpar[0] = 13.67318;
dpar[1] = 0;
dpar[2] = 17.02707;
dpar[3] = 0;
dpar[4] = 24.08231;
double value;
double abstol = 1e-16;
double intol = 1e-8;
int y = 12;
MM t = (MM)malloc(y*(n+2)*sizeof(TT));
t-> tempX = new double * [y];
for(size_t ii = 0; ii < y; ii++) {
t->tempX[ii] = new double [n];
}
t->tempX[0][1] = -0.03;
t->tempX[1][1] = -0.02;
t->tempX[2][1] = -0.015;
t->tempX[3][1] = -0.01;
t->tem...
2006 Apr 13
1
bus error on calling nmmin
...94
#8 0x0054da70 in Rprintf (format=0xbfff9570 "Error: invalid
connection\n") at ../../../../R-2.1.1/src/main/printutils.c:445
#9 0x0051bcec in nmmin (n=6575856, Bvec=0x5f0dc8, X=0xbffffd58,
Fmin=0xbffffd60, fminfn=0x2b8c <parabola>, fail=0xbffffd68,
abstol=9.9999999999999998e-17, intol=1e-08, ex=0x0, alpha=1, bet=0.5,
gamm=2, trace=4, fncount=0xbffffd9c, maxit=1000) at
../../../../R-2.1.1/src/main/optim.c:667
#10 0x00002ce0 in main () at nmminDemo.c:30
-----
I'm working under Mac OS X 10.3.9 with gcc 3.3 and R
platform powerpc-apple-darwin7.9.0
arch powerpc
os dar...