src
|
bail.c,
derivs.c,
enter.c,
extract.c,
f.c,
first.c,
initial.c,
inlist.c,
makefile,
new_vert.c,
order.c,
parse.c,
rates.c,
reader.c,
readme,
regress.c,
report.c,
reprint.c,
rxn.c,
rxn.h,
select.c,
setfiles.c,
sfit.c,
simplex.h,
splist.c,
sum_resi.c,
wr_results.c,
wr_species.c,
|
|
|
#include "simplex.h"
#include "rxn.h"
int NSF, NPF;
int *splst, *plist;
extern int splist();
double **matrix(nr,nc)
{
int i;
double **m;
m = (double **) malloc((unsigned) (nr+1)*sizeof(double *));
for(i = 0; i <= nr; i++){
m[i] = (double *)malloc((unsigned)(nc+1)*sizeof(double));
if (!m[i]){
printf("out of memory\n"); exit(0);
}
}
return m;
}
int M, NVPP, N, *h, *l;
double *next, *mean, *error, *maxerr, *step, **data, **simp;
enter(name)
char *name;
{
register int i, j;
if ((fpdata = fopen(name, "r")) == NULL) {
fprintf(stderr, "simplex: can't open %s\n", name);
exit(1);
}
printf("SIMPLEX Optimization\n\n");
fscanf(fpdata, "%d", &maxiter);
fscanf(fpdata, "%d %d", &NPF, &NSF);
plist = (int *)malloc((NPF+1)*sizeof(int));
splst = (int *)malloc((NSF+1)*sizeof(int));
for (i=0 ; i
|