/* fixtsf.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ #include "armaf.h" #include void setdrf(int k); extern struct mcof *pfc; extern int nfc,np,ndif; static void oprj(double *v,int i,int j); double fixtsf(struct fmod *x,int n,double *var,double *cr) { double *cp,*p,*q,*r,*s,*pmax; struct mcof *pp; double e,ssq,drfmod(struct fmod,double *); int j,k,psinv(double *,int); cp=(double *)calloc(np,sizeof(double)); for(p=var,pmax=p+np*np; pcf += *s++; } } else ssq= -1.; free(cp); setdrf(0); return ssq; } static void oprj(double *var,int n,int m) { double s,*pd,*p; int i,j; pd=(double *)calloc(n,sizeof(double)); for(i=0,p=pd,s=0.; i