#ifndef _ARIADNE_H_
#define _ARIADNE_H_

#include<limits.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<pthread.h>
#include<errno.h>
#include"seq_util.h"
#include"profile.h"
#include"cl.h"
#include"gapstat.h"

#define ARIADNE_VERSION "1.3"
#define ARIADNE_PREAMBLE "Copyright 2000, Richard Mott, Wellcome Trust Centre for Human Genetics, University of Oxford\nFor help see http://www.well.ox.ac.uk/ariadne  For usage use -help\n"

#define TRAINING_SIZE 200
#define SCALE_FACTOR 1


typedef struct pparams {
  int A, B;
  int **matrix;
  double pthresh1, pthresh2, dbsize;
  int align;
  int hits;
  int total;
  int self;
  int all;
}
PPARAMS;

typedef struct island_struct {
  int i, j, id, score;
}
ISLAND;

int CompareSequenceToProfiles( FILE *seqfp, FILE *profp, PPARAMS *params  );
int CompareProfileToSequences( FILE *seqfp, FILE *profp, PPARAMS *params  );
int CompareProfileToSequences2( FILE *seqfp, PROFILE *pro, PPARAMS *params  );
int CompareSequenceToSequences( FILE *seq2fp, FILE *seqfp, PPARAMS *params );

int SWScoreProteinToProfile( SEQUENCE *seq, PROFILE *psi, int A, int B );


int TopAlignProteinToProfile( SEQUENCE *seq, PROFILE *pro, 
			      int pro_start, int pro_extend, int top, double ethresh, int self, double lambda0, double K0, double H, double alpha );

int IslandCmp( const void *a, const void *b );

#endif


