#include "bitvec.h"
#include "params.h"
#include "unichar.h"
#include "unicity_table.h"
Go to the source code of this file.
◆ AddProtoToConfig
AddProtoToConfig
Set a single proto bit in the specified configuration.
Definition at line 75 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 84 of file protos.h.
◆ CLASS_TYPE
◆ CLASSES
◆ CONFIGS
◆ PROTO
◆ AddConfigToClass()
Definition at line 47 of file protos.cpp.
47 {
48 int NewNumConfigs;
49 int NewConfig;
50 int MaxNumProtos;
52
55
57
60
64
66 }
71
72 return (NewConfig);
73}
void * Erealloc(void *ptr, int size)
◆ AddProtoToClass()
Definition at line 84 of file protos.cpp.
84 {
86
89
92 NewNumProtos));
93
96 }
99 return (NewProto);
100}
◆ FillABC()
void FillABC |
( |
PROTO |
Proto | ) |
|
Definition at line 108 of file protos.cpp.
108 {
109 float Slope, Intercept, Normalizer;
110
111 Slope = tan(Proto->
Angle * 2.0 * M_PI);
112 Intercept = Proto->
Y - Slope * Proto->
X;
113 Normalizer = 1.0 / sqrt (Slope * Slope + 1.0);
114 Proto->
A = Slope * Normalizer;
115 Proto->
B = -Normalizer;
116 Proto->
C = Intercept * Normalizer;
117}
◆ FreeClass()
Definition at line 125 of file protos.cpp.
125 {
126 if (Class) {
128 delete Class;
129 }
130}
void FreeClassFields(CLASS_TYPE Class)
◆ FreeClassFields()
Definition at line 138 of file protos.cpp.
138 {
139 int i;
140
141 if (Class) {
147 }
148 }
149}
◆ InitPrototypes()
◆ NewClass()
CLASS_TYPE NewClass |
( |
int |
NumProtos, |
|
|
int |
NumConfigs |
|
) |
| |
Definition at line 157 of file protos.cpp.
157 {
159
161
162 if (NumProtos > 0)
164
165 if (NumConfigs > 0)
172 return (Class);
173
174}