42 #define PROTO_INCREMENT 32 43 #define CONFIG_INCREMENT 16 121 for (Bit = Class->
NumProtos; Bit < NewNumProtos; Bit++)
127 tprintf(
"Ouch! number of protos = %d, vs max of %d!",
146 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
149 TotalLength += (
ProtoIn (Class, Pid))->Length;
152 return (TotalLength);
167 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
168 TotalLength += (
ProtoIn (Class, Pid))->Length;
170 return (TotalLength);
199 FLOAT32 Slope, Intercept, Normalizer;
201 Slope = tan (Proto->
Angle * 2.0 *
PI);
202 Intercept = Proto->
Y - Slope * Proto->
X;
203 Normalizer = 1.0 / sqrt (Slope * Slope + 1.0);
204 Proto->
A = Slope * Normalizer;
205 Proto->
B = -Normalizer;
206 Proto->
C = Intercept * Normalizer;
276 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
void cprintf(const char *format,...)
int AddConfigToClass(CLASS_TYPE Class)
CLASS_TYPE NewClass(int NumProtos, int NumConfigs)
#define NUMBER_OF_CLASSES
FLOAT32 ClassConfigLength(CLASS_TYPE Class, BIT_VECTOR Config)
void FreeClassFields(CLASS_TYPE Class)
void memfree(void *element)
BIT_VECTOR NewBitVector(int NumBits)
#define WordsInVectorOfSize(NumBits)
#define STRING_VAR(name, val, comment)
void FreeClass(CLASS_TYPE Class)
void FillABC(PROTO Proto)
void FreeBitVector(BIT_VECTOR BitVector)
void * Erealloc(void *ptr, int size)
#define PrintProtoLine(Proto)
void CopyProto(PROTO Src, PROTO Dest)
char * classify_training_file
FLOAT32 ClassProtoLength(CLASS_TYPE Class)
#define ProtoIn(Class, Pid)
#define test_bit(array, bit)
#define reset_bit(array, bit)
#define zero_all_bits(array, length)
void PrintProtos(CLASS_TYPE Class)
int AddProtoToClass(CLASS_TYPE Class)
BIT_VECTOR ExpandBitVector(BIT_VECTOR Vector, int NewNumBits)
#define PrintProto(Proto)
CLASS_STRUCT TrainingData[NUMBER_OF_CLASSES]