Program Listing for File edit_dist.h
↰ Return to documentation for file (rcsw/algorithm/edit_dist.h
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include "rcsw/rcsw.h"
/*******************************************************************************
* Structure Definitions
******************************************************************************/
struct edit_dist_finder {
const void *seq_a;
const void *seq_b;
size_t elt_size;
int* memoization;
bool_t (*cmpe)(const void* const e1,
const void* const e2);
size_t (*seq_len)(const void* const seq);
};
/*******************************************************************************
* API Functions
******************************************************************************/
BEGIN_C_DECLS
RCSW_API status_t edit_dist_init(struct edit_dist_finder * finder,
const void* a,
const void*b,
size_t elt_size,
bool_t (*cmpe)(const void* e1,
const void* e2),
size_t (*seq_len)(const void* seq));
RCSW_API void edit_dist_destroy(struct edit_dist_finder * finder);
RCSW_API int edit_dist_find(struct edit_dist_finder * finder,
enum exec_type type);
END_C_DECLS