37 int cur_anchor_len = 0;
38 bool chain_swapping =
false;
40 int max_chain_swaps = 0;
41 int max_not_swaps = 0;
42 int max_total_len = 0;
43 int max_anchor_len = 0;
44 col_type anchor_col = col_init;
45 float last_ms = ms_init;
60 chain_swapping =
false;
61 anchor_col = col_init;
65 void reset_max_seq() {
72 void update_max_seq() {
73 max_chain_swaps = get_max_chain_swaps();
74 max_not_swaps = get_max_not_swaps();
75 max_total_len = get_max_total_len();
76 max_anchor_len = get_max_anchor_len();
94 if (chain_swaps != 0 || not_swaps != 0) {
109 chain_swapping =
false;
110 max_anchor_len = get_max_anchor_len();
122 chain_swapping =
false;
127 void operator()(
const col_type& ct,
const base_type& bt,
const col_type& last_ct,
const float& any_ms)
129 if (last_ms * chain_slowdown_scale_threshold < any_ms) {
136 case base_left_right:
137 case base_right_left:
150 if (anchor_col != col_init)
151 chain_swapping =
true;
153 case base_single_single:
160 case base_single_jump:
164 anchor_col = last_ct;
166 chain_swapping =
true;
168 case base_jump_single:
174 if ((anchor_col == col_left && ct == col_right) ||
175 (anchor_col == col_right && ct == col_left)) {
179 if (chain_swapping) {
187 if (chain_swapping) {
205 int get_max_total_len() {
206 return cur_len > max_total_len ? cur_len : max_total_len;
209 int get_max_anchor_len() {
210 return cur_anchor_len > max_anchor_len ? cur_anchor_len
214 int get_max_chain_swaps() {
215 return chain_swaps > max_chain_swaps ? chain_swaps : max_chain_swaps;
218 int get_max_not_swaps() {
219 return not_swaps > max_not_swaps ? not_swaps : max_not_swaps;