#ifndef WAVEFRONT_SEQUENCES_H_
#define WAVEFRONT_SEQUENCES_H_
#include "utils/commons.h"
typedef int (*alignment_match_funct_t)(int,int,void*);
typedef enum {
wf_sequences_ascii = 0,
wf_sequences_lambda = 1,
wf_sequences_packed2bits = 2,
} wf_sequences_mode_t;
typedef struct {
wf_sequences_mode_t mode; bool reverse; char* pattern; char* text; int pattern_begin; int pattern_length; int text_begin; int text_length; alignment_match_funct_t match_funct; void* match_funct_arguments; char* seq_buffer; int seq_buffer_allocated; char* pattern_buffer; char* text_buffer; int pattern_buffer_length; int text_buffer_length; char pattern_eos; char text_eos; } wavefront_sequences_t;
void wavefront_sequences_allocate(
wavefront_sequences_t* const wf_sequences);
void wavefront_sequences_free(
wavefront_sequences_t* const wf_sequences);
void wavefront_sequences_init_ascii(
wavefront_sequences_t* const wf_sequences,
const char* const pattern,
const int pattern_length,
const char* const text,
const int text_length,
const bool reverse);
void wavefront_sequences_init_lambda(
wavefront_sequences_t* const wf_sequences,
alignment_match_funct_t match_funct,
void* match_funct_arguments,
const int pattern_length,
const int text_length,
const bool reverse);
void wavefront_sequences_init_packed2bits(
wavefront_sequences_t* const wf_sequences,
const uint8_t* const pattern,
const int pattern_length,
const uint8_t* const text,
const int text_length,
const bool reverse);
bool wavefront_sequences_cmp(
wavefront_sequences_t* const wf_sequences,
const int pattern_pos,
const int text_pos);
char wavefront_sequences_get_pattern(
wavefront_sequences_t* const wf_sequences,
const int position);
char wavefront_sequences_get_text(
wavefront_sequences_t* const wf_sequences,
const int position);
void wavefront_sequences_set_bounds(
wavefront_sequences_t* const wf_sequences,
const int pattern_begin,
const int pattern_end,
const int text_begin,
const int text_end);
#endif