Program Listing for File lcs.h
↰ Return to documentation for file (rcsw/algorithm/lcs.h
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include "rcsw/rcsw.h"
/*******************************************************************************
* Structure Definitions
******************************************************************************/
struct lcs_calculator {
size_t size;
size_t len_x;
size_t len_y;
const char * y;
const char * x;
int *results;
char *sequence;
};
/*******************************************************************************
* API Functions
******************************************************************************/
BEGIN_C_DECLS
RCSW_API status_t lcs_init(struct lcs_calculator * lcs,
const char * x,
const char * y);
RCSW_API void lcs_destroy(struct lcs_calculator * lcs);
RCSW_API int lcs_rec(const struct lcs_calculator* lcs);
RCSW_API int lcs_iter(struct lcs_calculator * lcs);
END_C_DECLS