dict/matchdefs.h

Go to the documentation of this file.
00001 
00019 #ifndef   MATCHDEFS_H
00020 #define   MATCHDEFS_H
00021 
00022 /* =================
00023           Include Files and Type Defines
00024  ==================== */
00025 #include "general.h"
00026 #include <stdio.h>
00027 
00029 #define MAX_NUM_CLASSES   100
00030 
00031 #define MAX_CLASS_ID    255
00032 
00037 typedef UINT8 CLASS_ID;
00038 #define NO_CLASS      0
00039 
00047 typedef CLASS_ID INDEX_TO_CLASS[MAX_NUM_CLASSES];
00048 #define ILLEGAL_CLASS (-1)
00049 
00054 typedef INT16 CLASS_INDEX;
00062 typedef CLASS_INDEX CLASS_TO_INDEX[MAX_CLASS_ID + 1];
00063 
00071 typedef INT16 PROTO_ID;
00072 #define NO_PROTO  (-1)
00073 
00081 typedef UINT8 FEATURE_ID;
00082 #define NO_FEATURE      255
00083 #define NOISE_FEATURE   254
00084 #define MISSING_PROTO   254
00085 #define MAX_NUM_FEAT    40
00086 #define MAX_FEATURE_ID    250
00087 
00093 typedef FLOAT32 RATING;
00094 
00105 typedef FLOAT32 CERTAINTY;
00106 
00111 typedef struct
00112 {
00113   CLASS_ID Class;
00114   RATING Rating;
00115   CERTAINTY Certainty;
00116 } MATCH_RESULT;
00117 
00122 typedef MATCH_RESULT SORTED_CLASSES[MAX_CLASS_ID + 1];
00123 
00124 /* =================
00125           Public Function Prototypes
00126  ==================== */
00127 
00150 /* misc test functions for proto id's and feature id's */
00151 #define IsValidFeature(Fid) ((Fid) < MAX_FEATURE_ID)
00152 #define IsValidProto(Pid) ((Pid) >= 0)
00153 
00154 #if defined(__STDC__) || defined(__cplusplus)
00155 # define _ARGS(s) s
00156 #else
00157 # define _ARGS(s) ()
00158 #endif
00159 
00160 /* matchdefs.c */
00161 int CompareMatchResults
00162 _ARGS ((MATCH_RESULT * Result1, MATCH_RESULT * Result2));
00163 
00164 void PrintMatchResult _ARGS ((FILE * File, MATCH_RESULT * MatchResult));
00165 
00166 void PrintMatchResults
00167 _ARGS ((FILE * File, int N, MATCH_RESULT MatchResults[]));
00168 
00169 #undef _ARGS
00170 
00171 /* =================
00172         Global Data Definitions and Declarations
00173  ==================== */
00174 #endif

Generated on Wed Feb 28 19:49:10 2007 for Tesseract by  doxygen 1.5.1