All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
matchdefs.h
Go to the documentation of this file.
1 /******************************************************************************
2  ** Filename: matchdefs.h
3  ** Purpose: Generic interface definitions for feature matchers.
4  ** Author: Dan Johnson
5  ** History: Fri Jan 19 09:21:25 1990, DSJ, Created.
6  **
7  ** (c) Copyright Hewlett-Packard Company, 1988.
8  ** Licensed under the Apache License, Version 2.0 (the "License");
9  ** you may not use this file except in compliance with the License.
10  ** You may obtain a copy of the License at
11  ** http://www.apache.org/licenses/LICENSE-2.0
12  ** Unless required by applicable law or agreed to in writing, software
13  ** distributed under the License is distributed on an "AS IS" BASIS,
14  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ** See the License for the specific language governing permissions and
16  ** limitations under the License.
17  ******************************************************************************/
18 #ifndef MATCHDEFS_H
19 #define MATCHDEFS_H
20 
24 #include "host.h"
25 #include <stdio.h>
26 #include "unichar.h"
27 
28 /* define the maximum number of classes defined for any matcher
29  and the maximum class id for any matcher. This must be changed
30  if more different classes need to be classified */
31 #define MAX_NUM_CLASSES MAX_INT16
32 #define MAX_CLASS_ID (MAX_NUM_CLASSES - 1)
33 
36 #define NO_CLASS (0)
37 
41 typedef inT16 PROTO_ID;
42 #define NO_PROTO (-1)
43 
47 typedef uinT8 FEATURE_ID;
48 #define NO_FEATURE 255
49 #define NOISE_FEATURE 254
50 #define MISSING_PROTO 254
51 #define MAX_NUM_FEAT 40
52 #define MAX_FEATURE_ID 250
53 
56 typedef FLOAT32 RATING;
57 
63 
65 typedef struct
66 {
70 }
71 
72 
74 
77 
78 /*----------------------------------------------------------------------------
79  Public Function Prototypes
80 ----------------------------------------------------------------------------*/
89 /* misc test functions for proto id's and feature id's */
90 #define IsValidFeature(Fid) ((Fid) < MAX_FEATURE_ID)
91 #define IsValidProto(Pid) ((Pid) >= 0)
92 
93 #if defined(__STDC__) || defined(__cplusplus)
94 # define _ARGS(s) s
95 #else
96 # define _ARGS(s) ()
97 #endif
98 
99 /* matchdefs.c */
100 int CompareMatchResults
101 _ARGS ((MATCH_RESULT * Result1, MATCH_RESULT * Result2));
102 
103 void PrintMatchResult _ARGS ((FILE * File, MATCH_RESULT * MatchResult));
104 
105 void PrintMatchResults
106 _ARGS ((FILE * File, int N, MATCH_RESULT MatchResults[]));
107 
108 #undef _ARGS
109 
110 /*----------------------------------------------------------------------------
111  Global Data Definitions and Declarations
112 ----------------------------------------------------------------------------*/
113 #endif
float FLOAT32
Definition: host.h:111
inT16 PROTO_ID
Definition: matchdefs.h:41
FLOAT32 RATING
Definition: matchdefs.h:56
UNICHAR_ID CLASS_ID
Definition: matchdefs.h:35
#define _ARGS(s)
Definition: matchdefs.h:96
CLASS_ID Class
Definition: matchdefs.h:67
uinT8 FEATURE_ID
Definition: matchdefs.h:47
int UNICHAR_ID
Definition: unichar.h:33
CERTAINTY Certainty
Definition: matchdefs.h:69
#define MAX_CLASS_ID
Definition: matchdefs.h:32
FLOAT32 CERTAINTY
Definition: matchdefs.h:62
RATING Rating
Definition: matchdefs.h:68
short inT16
Definition: host.h:100
MATCH_RESULT SORTED_CLASSES[MAX_CLASS_ID+1]
Definition: matchdefs.h:76
unsigned char uinT8
Definition: host.h:99