From d44b4794c679141a08fd802475bb542ecf5b7c51 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 6 Nov 2008 23:01:41 +0100 Subject: ok, fast (but not fastest) matcher in place, no check output... Signed-off-by: Henrik Rydberg --- match/match.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 match/match.h (limited to 'match/match.h') diff --git a/match/match.h b/match/match.h new file mode 100644 index 0000000..8936de4 --- /dev/null +++ b/match/match.h @@ -0,0 +1,25 @@ +#ifndef MATCHER_H +#define MATCHER_H + +/** + * Special implementation of the hungarian algorithm. + * The maximum number of fingers matches a uint32. + * Bitmasks are used extensively. + */ + +#define DIM_FINGER 16 +#define DIM2_FINGER (DIM_FINGER * DIM_FINGER) + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) + +typedef int bool; + +//////////////////////////////////////////////////////// + +void match_fingers(int index[DIM_FINGER], float A[DIM2_FINGER], + int nrow, int ncol); + +//////////////////////////////////////////////////////// + +#endif -- cgit v1.2.3