mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-03 02:48:32 -06:00
one step closer, need to figure out gradient of func and how to send cam/node/aspectratio with void* fdata
This commit is contained in:
@@ -163,9 +163,9 @@ int levmarq(int npar, double *par, int ny, double *y, double *dysq,
|
||||
double error_func(double *par, int ny, double *y, double *dysq,
|
||||
double (*func)(double *, int, void *), void *fdata) {
|
||||
int x;
|
||||
double res,e=0;
|
||||
double res, e = 0;
|
||||
|
||||
for (x=0; x<ny; x++) {
|
||||
for (x = 0; x < ny; x++) {
|
||||
res = func(par, x, fdata) - y[x];
|
||||
if (dysq) // weighted least-squares
|
||||
e += res*res/dysq[x];
|
||||
|
||||
Reference in New Issue
Block a user