/* seqts.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 "arma.h" #include void setdr(int k); extern int np; extern struct mcof *par; double seqts(double *x,int n,double *var,int kf) { double *pd,*pg,*pmax,*p,*q,*h,*f; int j; struct mcof *pp; double e,ssq,sig,sqrt(double),drmod(double,double *); pd=(double *)calloc(2*np,sizeof(double)); pg=pd+np; if(!kf){ for(p=var,pmax=p+np*np; pcf +=e*(*p++/=sig); for(kf=0,p=pg,h=var; p