#include <pithsync.h>
|
| FPCUTPT ()=default |
|
void | setup (FPCUTPT cutpts[], int16_t array_origin, STATS *projection, int16_t zero_count, int16_t pitch, int16_t x, int16_t offset) |
|
void | assign (FPCUTPT cutpts[], int16_t array_origin, int16_t x, bool faking, bool mid_cut, int16_t offset, STATS *projection, float projection_scale, int16_t zero_count, int16_t pitch, int16_t pitch_error) |
|
void | assign_cheap (FPCUTPT cutpts[], int16_t array_origin, int16_t x, BOOL8 faking, BOOL8 mid_cut, int16_t offset, STATS *projection, float projection_scale, int16_t zero_count, int16_t pitch, int16_t pitch_error) |
|
int32_t | position () |
|
double | cost_function () |
|
double | squares () |
|
double | sum () |
|
FPCUTPT * | previous () |
|
int16_t | cheap_cuts () const |
|
int16_t | index () const |
|
Definition at line 29 of file pithsync.h.
◆ FPCUTPT()
◆ assign()
void FPCUTPT::assign |
( |
FPCUTPT |
cutpts[], |
|
|
int16_t |
array_origin, |
|
|
int16_t |
x, |
|
|
bool |
faking, |
|
|
bool |
mid_cut, |
|
|
int16_t |
offset, |
|
|
STATS * |
projection, |
|
|
float |
projection_scale, |
|
|
int16_t |
zero_count, |
|
|
int16_t |
pitch, |
|
|
int16_t |
pitch_error |
|
) |
| |
Definition at line 94 of file pithsync.cpp.
109 int16_t balance_count;
118 int16_t half_pitch = pitch / 2 - 1;
123 else if (half_pitch < 0)
125 lead_flag = 1 << half_pitch;
127 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
128 back_balance &= lead_flag + lead_flag - 1;
131 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
132 if (projection->
pile_count (x + half_pitch) > zero_count)
133 fwd_balance |= lead_flag;
142 for (
index = x - pitch - pitch_error;
index <= x - pitch + pitch_error;
144 if (
index >= array_origin) {
145 segpt = &cutpts[
index - array_origin];
146 dist = x - segpt->xpos;
151 lead_flag = back_balance ^ segpt->fwd_balance;
153 while (lead_flag != 0) {
155 lead_flag &= lead_flag - 1;
159 for (balance_index = 0;
160 index + balance_index < x - balance_index;
172 r_index = segpt->region_index + 1;
173 total = segpt->mean_sum + dist;
174 balance_count += offset;
176 dist * dist + segpt->sq_sum + balance_count * balance_count;
177 mean = total / r_index;
178 factor = mean - pitch;
180 factor += sq_dist / (r_index) - mean * mean;
187 mid_cuts = segpt->mid_cuts + mid_cut;
188 region_index = r_index;
EXTERN bool textord_fast_pitch_test
int32_t pile_count(int32_t value) const
EXTERN double textord_balance_factor
◆ assign_cheap()
void FPCUTPT::assign_cheap |
( |
FPCUTPT |
cutpts[], |
|
|
int16_t |
array_origin, |
|
|
int16_t |
x, |
|
|
BOOL8 |
faking, |
|
|
BOOL8 |
mid_cut, |
|
|
int16_t |
offset, |
|
|
STATS * |
projection, |
|
|
float |
projection_scale, |
|
|
int16_t |
zero_count, |
|
|
int16_t |
pitch, |
|
|
int16_t |
pitch_error |
|
) |
| |
Definition at line 202 of file pithsync.cpp.
216 int16_t balance_count;
225 int16_t half_pitch = pitch / 2 - 1;
230 else if (half_pitch < 0)
232 lead_flag = 1 << half_pitch;
234 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
235 back_balance &= lead_flag + lead_flag - 1;
238 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
239 if (projection->
pile_count (x + half_pitch) > zero_count)
240 fwd_balance |= lead_flag;
250 if (
index >= array_origin) {
251 segpt = &cutpts[
index - array_origin];
252 dist = x - segpt->xpos;
256 lead_flag = back_balance ^ segpt->fwd_balance;
258 while (lead_flag != 0) {
260 lead_flag &= lead_flag - 1;
265 r_index = segpt->region_index + 1;
266 total = segpt->mean_sum + dist;
267 balance_count += offset;
269 dist * dist + segpt->sq_sum + balance_count * balance_count;
270 mean = total / r_index;
271 factor = mean - pitch;
273 factor += sq_dist / (r_index) - mean * mean;
279 mid_cuts = segpt->mid_cuts + mid_cut;
280 region_index = r_index;
int32_t pile_count(int32_t value) const
EXTERN double textord_balance_factor
◆ cheap_cuts()
int16_t FPCUTPT::cheap_cuts |
( |
| ) |
const |
|
inline |
◆ cost_function()
double FPCUTPT::cost_function |
( |
| ) |
|
|
inline |
◆ index()
int16_t FPCUTPT::index |
( |
| ) |
const |
|
inline |
◆ position()
int32_t FPCUTPT::position |
( |
| ) |
|
|
inline |
◆ previous()
◆ setup()
void FPCUTPT::setup |
( |
FPCUTPT |
cutpts[], |
|
|
int16_t |
array_origin, |
|
|
STATS * |
projection, |
|
|
int16_t |
zero_count, |
|
|
int16_t |
pitch, |
|
|
int16_t |
x, |
|
|
int16_t |
offset |
|
) |
| |
Definition at line 37 of file pithsync.cpp.
47 int16_t half_pitch = pitch / 2 - 1;
53 else if (half_pitch < 0)
55 lead_flag = 1 << half_pitch;
59 sq_sum = offset * offset;
67 if (x == array_origin) {
70 for (ind = 0; ind <= half_pitch; ind++) {
73 fwd_balance |= lead_flag;
77 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
78 back_balance &= lead_flag + lead_flag - 1;
81 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
82 if (projection->
pile_count (x + half_pitch) > zero_count)
83 fwd_balance |= lead_flag;
int32_t pile_count(int32_t value) const
◆ squares()
double FPCUTPT::squares |
( |
| ) |
|
|
inline |
◆ sum()
◆ fake_count
int16_t FPCUTPT::fake_count |
◆ faked
◆ terminal
The documentation for this class was generated from the following files: