Skip to content

Commit

Permalink
finish odr_short_c
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Jun 24, 2024
1 parent 73a0cf5 commit 93a12a9
Show file tree
Hide file tree
Showing 3 changed files with 317 additions and 108 deletions.
44 changes: 29 additions & 15 deletions c/example/example5.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,41 @@ int main()
double x[M][N] = {{0.982, 1.998, 4.978, 6.01}};
double y[NQ][N] = {{2.7, 7.4, 148.0, 403.0}};

// odr_short_c(fcn, &n, &m, &np, &nq, beta, (double *)y, (double *)x, &job, lower, upper);
// odr_basic_c(fcn, &n, &m, &np, &nq, beta, (double *)y, (double *)x, lower, upper, &job);

int ifixb[NP] = {1, 1};
int ndigit = -1;
double taufac = -1.0;
double sstol = -1.0;
double partol = -1.0;
int maxint = -1;
int ldwe = 1;
int ld2we = 1;
int ldwd = 1;
int ld2wd = 1;
double we[NQ][1][1] = {-1.0};
double wd[M][1][1] = {-1.0};
int iprint = 1001;
int lunerr = -1;
int lunrpt = -1;
int info = 0;
double *stpb = NULL;
double *sclb = NULL;

odr_c(fcn, &n, &m, &np, &nq, beta, (double *)y, (double *)x,
ifixb,
&job, &ndigit, &taufac, &sstol, &partol, &maxint, &iprint, &lunerr, &lunrpt,
stpb, sclb,
&info,
lower, upper);
// int ifixb[NP] = {1, 1};
// int ndigit = -1;
// double taufac = -1.0;
// double sstol = -1.0;
// double partol = -1.0;
// int maxint = -1;
// double *stpb = NULL;
// double *sclb = NULL;

odr_short_c(fcn, &n, &m, &np, &nq, beta, (double *)y, (double *)x,
(double *)we, &ldwe, &ld2we,
(double *)wd, &ldwd, &ld2wd,
lower, upper,
&job, &iprint, &lunerr, &lunrpt,
&info);

// odr_basic_c(fcn, &n, &m, &np, &nq, beta, (double *)y, (double *)x,
// ifixb,
// &job, &ndigit, &taufac, &sstol, &partol, &maxint, &iprint, &lunerr, &lunrpt,
// stpb, sclb,
// &info,
// lower, upper);

return 0;
}
Loading

0 comments on commit 93a12a9

Please sign in to comment.