[BACK]Return to sfile.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / hgm / mh / src

File: [local] / OpenXM / src / hgm / mh / src / sfile.h (download)

Revision 1.8, Fri Mar 8 04:54:01 2013 UTC (11 years, 3 months ago) by takayama
Branch: MAIN
Changes since 1.7: +2 -1 lines

New options: --strategy n --abserr e1 --relerr e2
 If n==0, then the 4th Runge-Kutta is used.
If n==1, then the adaptive 4th Runge-Kutta is used where e1 is the absolute error and e2 is the relative error
to control the step size.

/*
   $OpenXM: OpenXM/src/hgm/mh/src/sfile.h,v 1.8 2013/03/08 04:54:01 takayama Exp $
 */
struct SFILE {
  int byFile;
  char *s;
  int pt;
  int len;
  int limit;
  FILE *fp;
  int forRead;
  int copied;
};

struct MH_RESULT {
  double x;
  double *y;
  int rank;
  struct SFILE **sfpp;  /* sfpp[0], ..., spff[size-1] */
  int size;
};
 
struct SFILE *mh_fopen(char *name, char *mode, int byFile);
char *mh_fgets(char *str,int size,struct SFILE *sfp);
int mh_fputs(char *s,struct SFILE *sfp);
int mh_fclose(struct SFILE *sfp);
int mh_outstr(char *str,int size,struct SFILE *sfp);
void *mh_malloc(int s);
int mh_free(void *p);
int mh_exit(int n);
void mh_check_intr(int interval);
void mh_error(char *s,int code);

#define MH_SSIZE 1024
#define MH_RESET_EXIT 0x7fffffff

/* prototypes in wmain.c */
struct MH_RESULT *mh_main(int argc,char *argv[]);
/* prototypes in rk.c*/
struct MH_RESULT mh_rkmain(double x0,double y0[],double xn);
/* prototype in jack-n.c */
struct MH_RESULT *jk_main(int argc,char *argv[]);