Aitken Solver roots and one recursion
- From: Pino <beltenebroso@xxxxxxxx>
- Date: 25 Apr 2007 13:30:24 -0700
Hi ,
I have two problems
1)I am implementing a nonlinear solver in c++
Now I am using Aitken (seems to be the faster ie wr to Steffenson)
i would like a suggenstion from you.
What is now the most accurate and fast method that does not need of
derivatives?
....the function is quite smooth..
2) I would like to speed up the following recursion.THere is a sort of
alg. that you can suggest to me?
Is this recursion famous??
thanks !!
{ int j=0;
Vector <double> pr(m);
Vector <double> cdp(n);
Array2D < double> ptk(n+1,n+1);
ptk[0][0]=1.0;
for (int i=1;i<n+1;i++) {
ptk[0][i]=ptk[0][i-1]*(1.0-cdp[i-1]);
for (j=1;j<=i-1;j++) {
ptk[j][i]=ptk[j][i-1]*(1.0-cdp[i-1])+ptk[j-1][i-1]*cdp[i-1];
}
ptk[i][i]=ptk[i-1][i-1]*cdp[i-1];
}
for (int i=0;i<m;i++) pr[i]=ptk[i][n];
return pr;
}
thanks!
.
- Prev by Date: interpolation w/ cubic convolution kernel: boundary treatment?
- Next by Date: Aitken Solver roots and one recursion
- Previous by thread: interpolation w/ cubic convolution kernel: boundary treatment?
- Next by thread: Aitken Solver roots and one recursion
- Index(es):