/* Steven Andrews, 11/10/90 */ /* expanded 1-2/93, modified substantially 9/98 */ /* See documentation called Rn doc */ /* Copyright 2003 by Steven Andrews. Permission is granted for non-commercial use of and modifications to the code. */ #include "Rn.h" #include "random.h" #include #include #include "math2.h" float detpart(float *a,int n,char s[],int i); int makeV(float *c,int n,char *s) { int i,as; as=0; for(i=0;i1) ti+=sprintf(t+ti,"\n"); } return a; } float minV(float *a,int n) { float min; int i; min=a[0]; for(i=1;imax) max=a[i]; return max; } double maxVD(double *a,int n,int *indx) { double max; int i,imax; max=a[imax=0]; for(i=1;imax) max=a[imax=i]; if(indx) *indx=imax; return max; } double minVD(double *a,int n,int *indx) { double min; int i,imin; min=a[imin=0]; for(i=1;itol) return 0; return 1; } float detpart(float *a,int n,char s[],int i) { int j,p; float sum; if(i==n-1) { for(j=0;s[j];j++) ; return a[n*i+j]; } else { sum=0; p=1; for(j=0;j=0&&i+j=na&&j=0&&j