diff options
Diffstat (limited to 'match/test.c')
| -rw-r--r-- | match/test.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/match/test.c b/match/test.c index ad39370..1f535d1 100644 --- a/match/test.c +++ b/match/test.c | |||
| @@ -24,8 +24,45 @@ static void test1() | |||
| 24 | 942941.000000, | 24 | 942941.000000, |
| 25 | 462820.000000, | 25 | 462820.000000, |
| 26 | }; | 26 | }; |
| 27 | int index[DIM_FINGER]; | 27 | int index[DIM_FINGER], i; |
| 28 | match_fingers(index, A, 4, 4); | 28 | match_fingers(index, A, 4, 4); |
| 29 | for (i = 0; i < 4; i++) | ||
| 30 | printf("match[%d] = %d\n", i, index[i]); | ||
| 31 | } | ||
| 32 | |||
| 33 | static void test2() | ||
| 34 | { | ||
| 35 | float A[]={ | ||
| 36 | 0.000000, | ||
| 37 | 4534330.000000, | ||
| 38 | 22653552.000000, | ||
| 39 | 12252500.000000, | ||
| 40 | 685352.000000, | ||
| 41 | 4534330.000000, | ||
| 42 | 0.000000, | ||
| 43 | 9619317.000000, | ||
| 44 | 28409530.000000, | ||
| 45 | 6710170.000000, | ||
| 46 | 22653552.000000, | ||
| 47 | 9619317.000000, | ||
| 48 | 0.000000, | ||
| 49 | 47015292.000000, | ||
| 50 | 29788572.000000, | ||
| 51 | 2809040.000000, | ||
| 52 | 10428866.000000, | ||
| 53 | 38615920.000000, | ||
| 54 | 17732500.000000, | ||
| 55 | 719528.000000, | ||
| 56 | 12113945.000000, | ||
| 57 | 28196220.000000, | ||
| 58 | 46778656.000000, | ||
| 59 | 405.000000, | ||
| 60 | 14175493.000000, | ||
| 61 | }; | ||
| 62 | int index[DIM_FINGER], i; | ||
| 63 | match_fingers(index, A, 5, 5); | ||
| 64 | for (i = 0; i < 5; i++) | ||
| 65 | printf("match[%d] = %d\n", i, index[i]); | ||
| 29 | } | 66 | } |
| 30 | 67 | ||
| 31 | static void speed1() | 68 | static void speed1() |
| @@ -65,7 +102,12 @@ static void speed1() | |||
| 65 | 102 | ||
| 66 | int main(int argc,char* argv[]) | 103 | int main(int argc,char* argv[]) |
| 67 | { | 104 | { |
| 105 | printf("test1\n"); | ||
| 68 | test1(); | 106 | test1(); |
| 107 | printf("test2\n"); | ||
| 108 | test2(); | ||
| 109 | printf("speed1\n"); | ||
| 69 | speed1(); | 110 | speed1(); |
| 111 | printf("done\n"); | ||
| 70 | return 0; | 112 | return 0; |
| 71 | } | 113 | } |
