#include "bitvec.h"
#include "cutil.h"
#include "unichar.h"
#include "unicity_table.h"
#include "params.h"
Go to the source code of this file.
◆ AddProtoToConfig
AddProtoToConfig
Set a single proto bit in the specified configuration.
Definition at line 93 of file protos.h.
◆ ClassOfChar
#define ClassOfChar |
( |
|
Char | ) |
|
Value: NO_CLASS)
CLASS_STRUCT TrainingData[]
ClassOfChar
Return the class of a particular ASCII character value.
Definition at line 111 of file protos.h.
◆ FEATURE_SCALE
#define FEATURE_SCALE 100.0 |
◆ NUMBER_OF_CLASSES
◆ PrintProto
#define PrintProto |
( |
|
Proto | ) |
|
Value:(
tprintf(
"X=%4.2f, Y=%4.2f, Length=%4.2f, Angle=%4.2f", \
Proto->X, \
Proto->Y, \
Proto->Length, \
Proto->Angle)) \
PrintProto
Print out the contents of a prototype. The 'Proto' argument is of type 'PROTO'.
Definition at line 133 of file protos.h.
◆ PrintProtoLine
#define PrintProtoLine |
( |
|
Proto | ) |
|
Value:(
cprintf (
"A=%4.2f, B=%4.2f, C=%4.2f", \
Proto->A, \
Proto->B, \
Proto->C)) \
void cprintf(const char *format,...)
PrintProtoLine
Print out the contents of a prototype. The 'Proto' argument is of type 'PROTO'.
Definition at line 148 of file protos.h.
◆ ProtoIn
#define ProtoIn |
( |
|
Class, |
|
|
|
Pid |
|
) |
| (& (Class)->Prototypes [Pid]) |
ProtoIn
Choose the selected prototype in this class record. Return the pointer to it (type PROTO).
Definition at line 123 of file protos.h.
◆ RemoveProtoFromConfig
RemoveProtoFromConfig
Clear a single proto bit in the specified configuration.
Definition at line 102 of file protos.h.
◆ Y_OFFSET
◆ CLASS_TYPE
◆ CLASSES
◆ CONFIGS
◆ PROTO
◆ AddConfigToClass()
Definition at line 63 of file protos.cpp.
BIT_VECTOR NewBitVector(int NumBits)
#define WordsInVectorOfSize(NumBits)
void * Erealloc(void *ptr, int size)
#define zero_all_bits(array, length)
◆ AddProtoToClass()
Definition at line 99 of file protos.cpp.
121 for (Bit = Class->
NumProtos; Bit < NewNumProtos; Bit++)
127 tprintf(
"Ouch! number of protos = %d, vs max of %d!",
void * Erealloc(void *ptr, int size)
#define reset_bit(array, bit)
BIT_VECTOR ExpandBitVector(BIT_VECTOR Vector, int NewNumBits)
◆ ClassConfigLength()
Definition at line 142 of file protos.cpp.
146 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
149 TotalLength += (
ProtoIn (Class, Pid))->Length;
152 return (TotalLength);
#define ProtoIn(Class, Pid)
#define test_bit(array, bit)
◆ ClassProtoLength()
Definition at line 163 of file protos.cpp.
167 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
168 TotalLength += (
ProtoIn (Class, Pid))->Length;
170 return (TotalLength);
#define ProtoIn(Class, Pid)
◆ CopyProto()
◆ FillABC()
void FillABC |
( |
PROTO |
Proto | ) |
|
Definition at line 198 of file protos.cpp.
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;
◆ FreeClass()
Definition at line 215 of file protos.cpp.
void FreeClassFields(CLASS_TYPE Class)
◆ FreeClassFields()
Definition at line 228 of file protos.cpp.
void memfree(void *element)
void FreeBitVector(BIT_VECTOR BitVector)
◆ InitPrototypes()
◆ NewClass()
◆ PrintProtos()
Definition at line 273 of file protos.cpp.
276 for (Pid = 0; Pid < Class->
NumProtos; Pid++) {
void cprintf(const char *format,...)
#define PrintProtoLine(Proto)
#define ProtoIn(Class, Pid)
#define PrintProto(Proto)
◆ classify_training_file
char* classify_training_file = "MicroFeatures" |
◆ TrainingData