#include <math.h>
#include <stdio.h>
#include <malloc.h>

/* MAXWORD is the maximum number of characters allowed for a single word 
   in the data file and the input file */
#define MAXWORD 70

struct process{
  long max;
  long min;
};

typedef struct lifetime lifetime;
struct lifetime{
  double birth;
  double death;
  double mark;
};


/* The variables in the following structure are as follows:
\begin{itemize}
\item life      - whether a point is in the current max or min process
\item XplusG    - whether a point is in XplusG of the max or min process
\item events    - the number of births or deaths of each point by *time*
\item markseed  - seed for the marks that are given to each occurance of each 
                 point in the dominating process
\item timeseed  - seed for the time each point is alive at each stage of  the 
                 process 
\item initlives - Integer variable saying how many points are initially alive 
                 or dead at time zero in the dominating process.
\item data      - Raw data value.
\item lambda    - Value of the rate adjusted for each point. 
\item label     - label so that a pointer to a point can tell WHICH point it
                 is pointing to (i.e. if points is an array of type 
                 \verb%struct point%, \verb%points[i].label==i%).
\item continuous- Indicates whether this point is `always on'. 
\item nextbirth - stores time of next birth, it's death time and it's mark.
\item maxdt     - an array which stores death times of all points currently 
                 alive in the maximum process. 
\item mindt     - an array which stores death times of all points currently 
                 alive in the minimum process. 
\item pmin     - The proportion of points in the dominating process which are 
                 alive in the minimum process.
\end{itemize} */
typedef struct location location;
struct location{
  struct process life;
  struct process XplusG;
  long events;
  unsigned long markseed;
  unsigned long timeseed;
  long initlives;
  double data;
  double lambda;
  long label;
  int continuous;
  lifetime nextbirth;
  double *maxdt;
  double *mindt;
  double pmin;
  long maxalive;
};
