34 #define PRUNER_ANGLE 2
37 #define ANGLE_SHIFT (0.0)
41 #define MAX_PROTO_INDEX 24
42 #define BITS_PER_WERD (8 * sizeof (uinT32))
44 #define MAX_NUM_CONFIGS 64
45 #define MAX_NUM_PROTOS 512
46 #define PROTOS_PER_PROTO_SET 64
47 #define MAX_NUM_PROTO_SETS (MAX_NUM_PROTOS / PROTOS_PER_PROTO_SET)
48 #define NUM_PP_PARAMS 3
49 #define NUM_PP_BUCKETS 64
50 #define NUM_CP_BUCKETS 24
51 #define CLASSES_PER_CP 32
52 #define NUM_BITS_PER_CLASS 2
53 #define CLASS_PRUNER_CLASS_MASK (~(~0 << NUM_BITS_PER_CLASS))
54 #define CLASSES_PER_CP_WERD (CLASSES_PER_CP / NUM_BITS_PER_CLASS)
55 #define PROTOS_PER_PP_WERD BITS_PER_WERD
56 #define BITS_PER_CP_VECTOR (CLASSES_PER_CP * NUM_BITS_PER_CLASS)
57 #define MAX_NUM_CLASS_PRUNERS ((MAX_NUM_CLASSES + CLASSES_PER_CP - 1) / \
59 #define WERDS_PER_CP_VECTOR (BITS_PER_CP_VECTOR / BITS_PER_WERD)
60 #define WERDS_PER_PP_VECTOR ((PROTOS_PER_PROTO_SET+BITS_PER_WERD-1)/ \
62 #define WERDS_PER_PP (NUM_PP_PARAMS * NUM_PP_BUCKETS * \
64 #define WERDS_PER_CP (NUM_CP_BUCKETS * NUM_CP_BUCKETS * \
65 NUM_CP_BUCKETS * WERDS_PER_CP_VECTOR)
66 #define WERDS_PER_CONFIG_VEC ((MAX_NUM_CONFIGS + BITS_PER_WERD - 1) / \
130 #define MAX_NUM_INT_FEATURES 512
131 #define INT_CHAR_NORM_RANGE 256
160 #define MaxNumIntProtosIn(C) (C->NumProtoSets * PROTOS_PER_PROTO_SET)
161 #define SetForProto(P) (P / PROTOS_PER_PROTO_SET)
162 #define IndexForProto(P) (P % PROTOS_PER_PROTO_SET)
163 #define ProtoForProtoId(C,P) (&((C->ProtoSets[SetForProto (P)])-> \
164 Protos [IndexForProto (P)]))
165 #define PPrunerWordIndexFor(I) (((I) % PROTOS_PER_PROTO_SET) / \
167 #define PPrunerBitIndexFor(I) ((I) % PROTOS_PER_PP_WERD)
168 #define PPrunerMaskFor(I) (1 << PPrunerBitIndexFor (I))
170 #define MaxNumClassesIn(T) (T->NumClassPruners * CLASSES_PER_CP)
171 #define LegalClassId(c) ((c) >= 0 && (c) <= MAX_CLASS_ID)
172 #define UnusedClassIdIn(T,c) ((T)->Class[c] == NULL)
173 #define ClassForClassId(T,c) ((T)->Class[c])
174 #define ClassPrunersFor(T) ((T)->ClassPruner)
175 #define CPrunerIdFor(c) ((c) / CLASSES_PER_CP)
176 #define CPrunerFor(T,c) ((T)->ClassPruners[CPrunerIdFor(c)])
177 #define CPrunerWordIndexFor(c) (((c) % CLASSES_PER_CP) / CLASSES_PER_CP_WERD)
178 #define CPrunerBitIndexFor(c) (((c) % CLASSES_PER_CP) % CLASSES_PER_CP_WERD)
179 #define CPrunerMaskFor(L,c) (((L)+1) << CPrunerBitIndexFor (c) * NUM_BITS_PER_CLASS)
182 #define PRINT_MATCH_SUMMARY 0x001
183 #define DISPLAY_FEATURE_MATCHES 0x002
184 #define DISPLAY_PROTO_MATCHES 0x004
185 #define PRINT_FEATURE_MATCHES 0x008
186 #define PRINT_PROTO_MATCHES 0x010
187 #define CLIP_MATCH_EVIDENCE 0x020
189 #define MatchDebuggingOn(D) (D)
190 #define PrintMatchSummaryOn(D) ((D) & PRINT_MATCH_SUMMARY)
191 #define DisplayFeatureMatchesOn(D) ((D) & DISPLAY_FEATURE_MATCHES)
192 #define DisplayProtoMatchesOn(D) ((D) & DISPLAY_PROTO_MATCHES)
193 #define PrintFeatureMatchesOn(D) ((D) & PRINT_FEATURE_MATCHES)
194 #define PrintProtoMatchesOn(D) ((D) & PRINT_PROTO_MATCHES)
195 #define ClipMatchEvidenceOn(D) ((D) & CLIP_MATCH_EVIDENCE)
208 INT_TEMPLATES Templates);
211 INT_CLASS Class,
bool debug);
225 INT_CLASS
NewIntClass(
int MaxNumProtos,
int MaxNumConfigs);
242 #ifndef GRAPHICS_DISABLED
255 #endif // GRAPHICS_DISABLED