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.c | 326 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 match/match.c (limited to 'match/match.c') diff --git a/match/match.c b/match/match.c new file mode 100644 index 0000000..604faaf --- /dev/null +++ b/match/match.c @@ -0,0 +1,326 @@ +#include "match.h" +#include +#include + +/** + * MATLAB implementation of the hungarian algorithm (2008) + * + * modified by Henrik Rydberg (2008) + */ + +const float BIG_VALUE = 1e20; + +typedef unsigned short col_t; + +#define GETBIT2(m, row, col) ((m[col]>>row)&1U) +#define SETBIT2(m, row, col) (m[col]|=(1U<>x)&1U) +#define SETBIT(m, x) (m|=(1U< ncols) */ + { + dmin = ncols; + + for(col=0; col