diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2008-11-06 23:01:41 +0100 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2008-11-06 23:01:41 +0100 |
commit | d44b4794c679141a08fd802475bb542ecf5b7c51 (patch) | |
tree | 74251970cfbcc58d0252366be6e5e668149b8a48 /match/match.h | |
parent | 63de72d8d810e3692c96c7385b497bb4d68ef54a (diff) | |
download | xorg-input-kobomultitouch-d44b4794c679141a08fd802475bb542ecf5b7c51.tar.gz xorg-input-kobomultitouch-d44b4794c679141a08fd802475bb542ecf5b7c51.tar.bz2 xorg-input-kobomultitouch-d44b4794c679141a08fd802475bb542ecf5b7c51.zip |
ok, fast (but not fastest) matcher in place, no check output...
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'match/match.h')
-rw-r--r-- | match/match.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 |