#ifndef pz_symbol_chain_match_H #define pz_symbol_chain_match_H /* Matching two {pz_symbol_chain_t}s by dynamic programming. */ /* Last edited on 2008-02-08 11:43:13 by stolfi */ #include #include #include #include #include /* The procedures "pz_symbol_chain_match_find_best" and "pz_symbol_chain_match_refine" look for a monotone pairing "mt" (a "pz_match_t") between two curves that minimizes some measure of the distance between corresponding samples. They are entirely analogous to "pz_double_chain_match_find_best" and "pz_double_chain_match_refine", except that the sample distance "d(a[r], b[s]) == |a[r]-b[s]|" is computed on the decoded sample values. */ void pz_symbol_chain_match_find_best( pz_symbol_chain_t *a, pz_symbol_chain_t *b, double_vec_t decode, double_vec_t errorVar, double step, double maxDistSqr, double skipDistSqr, bool_t removeUnmatchedEnds, pz_match_t *mt, /* (OUT) */ double *avgDisc, /* (OUT) */ double *length, /* (OUT) */ double *matchedLength, /* (OUT) */ pz_match_cost_matrix_t *rCost /* (WORK) */ ); void pz_symbol_chain_match_refine( pz_symbol_chain_t *a, pz_symbol_chain_t *b, double_vec_t decode, double_vec_t errorVar, double step, pz_match_t *mtOld, int maxAdjust, double critDistSqr, double maxDistSqr, double skipDistSqr, pz_match_t *mt, /* (OUT) */ double *mismatch, /* (OUT) */ double *length, /* (OUT) */ double *matchedLength, /* (OUT) */ double_vec_t *minAvgDisc, /* (OUT) */ pz_match_cost_matrix_t *rCost /* (WORK) */ ); /* Copyright © 2001 Universidade Estadual de Campinas (UNICAMP). Authors: Helena C. G. Leitão and Jorge Stolfi. This file can be freely distributed, used, and modified, provided that this copyright and authorship notice is preserved, and that any modified versions are clearly marked as such. This software has NO WARRANTY of correctness or applicability for any purpose. Neither the authors nor their employers chall be held responsible for any losses or damages that may result from its use. */ #endif