diff options
Diffstat (limited to 'match/test.c')
-rw-r--r-- | match/test.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/match/test.c b/match/test.c index 192f969..f9f2a27 100644 --- a/match/test.c +++ b/match/test.c @@ -27,23 +27,23 @@ static void test1() { - float A[] = { - 1013.000000, - 3030660.000000, - 3559354.000000, - 12505925.000000, - 19008450.000000, - 6946421.000000, - 6118613.000000, - 698020.000000, - 3021800.000000, - 1017.000000, - 37573.000000, - 3242018.000000, - 8152794.000000, - 1266053.000000, - 942941.000000, - 462820.000000, + int A[] = { + 1013, + 3030660, + 3559354, + 12505925, + 19008450, + 6946421, + 6118613, + 698020, + 3021800, + 1017, + 37573, + 3242018, + 8152794, + 1266053, + 942941, + 462820, }; int index[DIM_FINGER], i; match_fingers(index, A, 4, 4); @@ -53,32 +53,32 @@ static void test1() static void test2() { - float A[] = { - 0.000000, - 4534330.000000, - 22653552.000000, - 12252500.000000, - 685352.000000, - 4534330.000000, - 0.000000, - 9619317.000000, - 28409530.000000, - 6710170.000000, - 22653552.000000, - 9619317.000000, - 0.000000, - 47015292.000000, - 29788572.000000, - 2809040.000000, - 10428866.000000, - 38615920.000000, - 17732500.000000, - 719528.000000, - 12113945.000000, - 28196220.000000, - 46778656.000000, - 405.000000, - 14175493.000000, + int A[] = { + 0, + 4534330, + 22653552, + 12252500, + 685352, + 4534330, + 0, + 9619317, + 28409530, + 6710170, + 22653552, + 9619317, + 0, + 47015292, + 29788572, + 2809040, + 10428866, + 38615920, + 17732500, + 719528, + 12113945, + 28196220, + 46778656, + 405, + 14175493, }; int index[DIM_FINGER], i; match_fingers(index, A, 5, 5); @@ -89,11 +89,11 @@ static void test2() static void speed1() { /* column-by-column matrix */ - float A[DIM2_FINGER]; - float x1[DIM_FINGER] = { 1, 5, 2, 3, 4, 5, 6, 7, 8 }; - float y1[DIM_FINGER] = { 1, 5, 2, 3, 4, 5.1, 6, 7, 8 }; - float x2[DIM_FINGER] = { 1.1, 3, 2, 4, 5, 6, 7, 8 }; - float y2[DIM_FINGER] = { 1, 3, 2, 4, 5, 6, 7, 8 }; + int A[DIM2_FINGER]; + int x1[DIM_FINGER] = { 1, 5, 2, 3, 4, 5, 6, 7, 8 }; + int y1[DIM_FINGER] = { 1, 5, 2, 3, 4, 6, 6, 7, 8 }; + int x2[DIM_FINGER] = { 1.1, 3, 2, 4, 5, 6, 7, 8 }; + int y2[DIM_FINGER] = { 1, 3, 2, 4, 5, 6, 7, 8 }; int index[DIM_FINGER]; int n1 = 4; int n2 = 7; |