#ifndef DEFINITIONS_H
#define DEFINITIONS_H

#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#define MAX_KNN 1000
#define MAX_DBLEN 35000000
#define MAX_BOX_NUM 100000  /* maximum number of MBRs in the index structure */
#define MAX_WINDOW 8024
#define MAX_QLEN 10000000   /* maximum query string length */
#define ALPH_LEN 5
#define INF 1000000
#define PI  3.141592653589793238462643
#define MAX_NUM_PTS 10000000  /* maximum # of marked entries in prediction matrix */
#define UNASSIGNED -2
#define CANDIDATE -1
#define PROCESSED 0
#define HASH_SIZE_PER_PAGE 8

typedef struct {
     int box_number;
     /* First letter that contributes to this box and number of shifts (points)
        contained in this box. */
     long start;
     int capacity;
     double key; /* Used for volume and density */
     /* Lower and higer values for the MBR that stores the number of
        occurences of each letter. */
     int lower[ALPH_LEN], higher[ALPH_LEN];
} MBR;

typedef struct {
  double mean, stddev;  /* mean & standard deviation */
  double minMean, minStddev;
} STATS;

#endif
