#include <pithsync.h>
|
| FPCUTPT () |
|
void | setup (FPCUTPT cutpts[], inT16 array_origin, STATS *projection, inT16 zero_count, inT16 pitch, inT16 x, inT16 offset) |
|
void | assign (FPCUTPT cutpts[], inT16 array_origin, inT16 x, BOOL8 faking, BOOL8 mid_cut, inT16 offset, STATS *projection, float projection_scale, inT16 zero_count, inT16 pitch, inT16 pitch_error) |
|
void | assign_cheap (FPCUTPT cutpts[], inT16 array_origin, inT16 x, BOOL8 faking, BOOL8 mid_cut, inT16 offset, STATS *projection, float projection_scale, inT16 zero_count, inT16 pitch, inT16 pitch_error) |
|
inT32 | position () |
|
double | cost_function () |
|
double | squares () |
|
double | sum () |
|
FPCUTPT * | previous () |
|
inT16 | cheap_cuts () const |
|
inT16 | index () const |
|
Definition at line 29 of file pithsync.h.
◆ FPCUTPT()
◆ assign()
void FPCUTPT::assign |
( |
FPCUTPT |
cutpts[], |
|
|
inT16 |
array_origin, |
|
|
inT16 |
x, |
|
|
BOOL8 |
faking, |
|
|
BOOL8 |
mid_cut, |
|
|
inT16 |
offset, |
|
|
STATS * |
projection, |
|
|
float |
projection_scale, |
|
|
inT16 |
zero_count, |
|
|
inT16 |
pitch, |
|
|
inT16 |
pitch_error |
|
) |
| |
Definition at line 98 of file pithsync.cpp.
122 inT16 half_pitch = pitch / 2 - 1;
127 else if (half_pitch < 0)
129 lead_flag = 1 << half_pitch;
131 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
132 back_balance &= lead_flag + lead_flag - 1;
135 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
136 if (projection->
pile_count (x + half_pitch) > zero_count)
137 fwd_balance |= lead_flag;
146 for (
index = x - pitch - pitch_error;
index <= x - pitch + pitch_error;
148 if (
index >= array_origin) {
149 segpt = &cutpts[
index - array_origin];
150 dist = x - segpt->xpos;
155 lead_flag = back_balance ^ segpt->fwd_balance;
157 while (lead_flag != 0) {
159 lead_flag &= lead_flag - 1;
163 for (balance_index = 0;
164 index + balance_index < x - balance_index;
176 r_index = segpt->region_index + 1;
177 total = segpt->mean_sum + dist;
178 balance_count += offset;
180 dist * dist + segpt->sq_sum + balance_count * balance_count;
181 mean = total / r_index;
182 factor = mean - pitch;
184 factor += sq_dist / (r_index) - mean * mean;
191 mid_cuts = segpt->mid_cuts + mid_cut;
192 region_index = r_index;
EXTERN double textord_balance_factor
inT32 pile_count(inT32 value) const
EXTERN bool textord_fast_pitch_test
◆ assign_cheap()
void FPCUTPT::assign_cheap |
( |
FPCUTPT |
cutpts[], |
|
|
inT16 |
array_origin, |
|
|
inT16 |
x, |
|
|
BOOL8 |
faking, |
|
|
BOOL8 |
mid_cut, |
|
|
inT16 |
offset, |
|
|
STATS * |
projection, |
|
|
float |
projection_scale, |
|
|
inT16 |
zero_count, |
|
|
inT16 |
pitch, |
|
|
inT16 |
pitch_error |
|
) |
| |
Definition at line 206 of file pithsync.cpp.
229 inT16 half_pitch = pitch / 2 - 1;
234 else if (half_pitch < 0)
236 lead_flag = 1 << half_pitch;
238 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
239 back_balance &= lead_flag + lead_flag - 1;
242 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
243 if (projection->
pile_count (x + half_pitch) > zero_count)
244 fwd_balance |= lead_flag;
254 if (
index >= array_origin) {
255 segpt = &cutpts[
index - array_origin];
256 dist = x - segpt->xpos;
260 lead_flag = back_balance ^ segpt->fwd_balance;
262 while (lead_flag != 0) {
264 lead_flag &= lead_flag - 1;
269 r_index = segpt->region_index + 1;
270 total = segpt->mean_sum + dist;
271 balance_count += offset;
273 dist * dist + segpt->sq_sum + balance_count * balance_count;
274 mean = total / r_index;
275 factor = mean - pitch;
277 factor += sq_dist / (r_index) - mean * mean;
283 mid_cuts = segpt->mid_cuts + mid_cut;
284 region_index = r_index;
EXTERN double textord_balance_factor
inT32 pile_count(inT32 value) const
◆ cheap_cuts()
inT16 FPCUTPT::cheap_cuts |
( |
| ) |
const |
|
inline |
◆ cost_function()
double FPCUTPT::cost_function |
( |
| ) |
|
|
inline |
◆ index()
inT16 FPCUTPT::index |
( |
| ) |
const |
|
inline |
◆ position()
inT32 FPCUTPT::position |
( |
| ) |
|
|
inline |
◆ previous()
◆ setup()
Definition at line 41 of file pithsync.cpp.
51 inT16 half_pitch = pitch / 2 - 1;
57 else if (half_pitch < 0)
59 lead_flag = 1 << half_pitch;
63 sq_sum = offset * offset;
71 if (x == array_origin) {
74 for (ind = 0; ind <= half_pitch; ind++) {
77 fwd_balance |= lead_flag;
81 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
82 back_balance &= lead_flag + lead_flag - 1;
85 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
86 if (projection->
pile_count (x + half_pitch) > zero_count)
87 fwd_balance |= lead_flag;
inT32 pile_count(inT32 value) const
◆ squares()
double FPCUTPT::squares |
( |
| ) |
|
|
inline |
◆ sum()
◆ fake_count
inT16 FPCUTPT::fake_count |
◆ faked
◆ terminal
The documentation for this class was generated from the following files: