/* Copyright (C) 1994-1998 Evgenii Rudnyi, http://Evgenii.Rudnyi.Ru/ Implementation of the algorithm described in E.B. Rudnyi. Statistical model of systematic errors: linear error model. Chemometrics and Intelligent Laboratory Systems. 1996, V. 34, N 1, p. 41-54. This software is a copyrighted work licensed under the terms, described in the file "FREE_LICENSE". */ /* ZXSSQ1 is a modified ZXSSQ 1) copy ZXSSQ.FOR to ZXSSQ1.FOR 2) comment out line 192 DATA SIG/16.8D0/ 3) change the subroutine to (rename and sig to the end fo the paramete list) SUBROUTINE ZXSSQ1 (FUNC,M,N,NSIG,EPS,DELTA,MAXFN,IOPT,PARM, * X,SSQ,F,XJAC,IXJAC,XJTJ,WORK,INFER,IER,SIG) we need to change SIG during the call time */ extern "C" { int zxssq1_(void (*func)(double* x, int *m, int *n, double* f), int *m, int *n, int *nsig, double *eps, double *delta, int *maxfn, int *iopt, double* parm, double *x, double *ssq, double* f, double* xjac, int *ixjac, double* xjtj, double* work, int *infer, int *ier, double *sig); int linv3p_(double* a, double* b,int *ijob, int *n, int *ier); int zreal1_(double (*f)(double *x), double *eps, double *eps2, double *eta, int *nsig, int *n, double* x, int *itmax, int *ier); int zreal2_(double (*f)(double *x), double *eps, double *eps2, double *eta, int *nsig, int *n, double* x, int *itmax, int *ier); void zbrent_(double (*f)(double *x), double *eps, int *nsig, double *a, double *b, int *maxfn, int *ier); //for generate int ggnml_(double *dseed, int *nr, float* r); }