11 #ifndef ALI_ALIGNER_HXX
12 #define ALI_ALIGNER_HXX
14 #ifndef ALI_SOLUTION_HXX
17 #ifndef ALI_TSTACK_HXX
20 #ifndef ALI_PATHMAP_HXX
24 #define ALI_ALIGNER_INS 1
25 #define ALI_ALIGNER_SUB 2
26 #define ALI_ALIGNER_DEL 3
27 #define ALI_ALIGNER_MULTI_FLAG 4
44 printf(
"%4.2f %4.2f %4.2f %8p", d1, d2, d3, starts);
80 unsigned char op = 0) {
87 printf(
"(%3ld %4.2f %2d)", start, costs, operation);
102 elem = list_of_dels.
first();
105 elem = list_of_dels.
next();
112 printf(
"DEL_LIST: ");
125 elem = list_of_dels.
first();
129 elem = list_of_dels.
next();
141 elem = list_of_dels.
first();
144 elem = list_of_dels.
next();
150 void insert(
unsigned long start,
float costs,
unsigned char operation) {
156 float update(
unsigned long position);
158 unsigned long y_offset);
159 void optimize(
unsigned long position);
177 if (costs < d3 || d3 == -1.0) {
189 if (costs < d1 || d1 == -1.0) {
200 unsigned long start_y,
unsigned long end_y)
211 unsigned long start_x,
unsigned long end_x) {
213 unsigned char operation = 0;
215 min = (akt_cell->
d1 < akt_cell->
d2) ? akt_cell->
d1 : akt_cell->
d2;
216 if (akt_cell->
d1 == min)
218 if (akt_cell->
d2 == min)
225 unsigned long start_y,
unsigned long end_y) {
227 unsigned char operation = 0;
229 min = (akt_cell->
d3 < akt_cell->
d2) ? akt_cell->
d3 : akt_cell->
d2;
230 if (akt_cell->
d3 == min)
232 if (akt_cell->
d2 == min)
239 unsigned long start_y,
unsigned long end_y) {
252 printf(
"d1 = %f, d2 = %f, d3 = %f\n", d1, d2, d3);
253 printf(
"left starts = ");
255 elem = left_starts.
first();
258 elem = left_starts.
next();
266 printf(
"up starts = ");
268 elem = up_starts.
first();
271 elem = up_starts.
next();
302 delete map_list->
first();
304 delete map_list->
next();
317 unsigned long result_counter;
318 unsigned long start_x, end_x, start_y, end_y;
320 float minimum2(
float a,
float b);
321 float minimum3(
float a,
float b,
float c);
323 void calculate_first_column_first_cell(
325 void calculate_first_column_second_cell(
328 void calculate_first_column_cell(
334 void calculate_second_column_first_cell(
337 void calculate_second_column_second_cell(
341 void calculate_second_column_cell(
349 void calculate_first_cell(
352 void calculate_second_cell(
358 unsigned long pos_x,
unsigned long pos_y,
365 void calculate_matrix();
369 unsigned long pos_x,
unsigned long pos_y,
370 unsigned char operation,
371 int random_mapping_flag = 0);
373 unsigned long pos_x,
unsigned long pos_y);
374 void mapper_pre_random_up(
377 void mapper_pre_random_left(
381 unsigned long pos_x,
unsigned long pos_y);
383 unsigned long pos_x,
unsigned long pos_y);
388 unsigned long number_of_solutions();
392 unsigned long start_x,
unsigned long end_x,
393 unsigned long start_y,
unsigned long end_y);
403 #error ali_aligner.hxx included twice
404 #endif // ALI_ALIGNER_HXX
ALI_TLIST< ali_aligner_dellist_elem * > list_of_dels
float w_ins_multi(unsigned long startx, unsigned long endx)
void ali_out_of_memory_if(bool cond)
ALI_TLIST< ali_pathmap_up_pointer > up_starts
float update(unsigned long position)
void optimize(unsigned long position)
void print_cont(unsigned long position)
ALI_TARRAY< ali_pathmap_up_pointer > * starts
ali_aligner_cell ** cells
float w_del_multi_cheap(unsigned long start, unsigned long end)
ALI_TLIST< ALI_MAP * > * map_list
static HelixNrInfo * start
ALI_TARRAY< ali_pathmap_up_pointer > * starts(float costs, unsigned long y_offset)
void insert_up(unsigned long start, unsigned char operation, float costs)
void insert_left(unsigned long start, unsigned char operation, float costs)
void update_border(unsigned long start_x, unsigned long end_x, unsigned long start_y, unsigned long end_y)
void insert(unsigned long start, float costs, unsigned char operation)
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
ALI_TLIST< ALI_MAP * > * solutions()
void update_left(ali_aligner_cell *akt_cell, unsigned long akt_pos, unsigned long start_x, unsigned long end_x)
ali_aligner_last_cell(ALI_PROFILE *prof)
ALI_ALIGNER(ALI_ALIGNER_CONTEXT *context, ALI_PROFILE *profile, unsigned long start_x, unsigned long end_x, unsigned long start_y, unsigned long end_y)
float gap_percent(unsigned long begin, unsigned long end)
float w_ins_multi_cheap(unsigned long startx, unsigned long endx)
ali_aligner_dellist(ALI_PROFILE *p)
ali_aligner_column(unsigned long length)
ali_aligner_dellist_elem(unsigned long s=0, float c=0.0, unsigned char op=0)
void insert(ALI_MAP *in_map)
void update_up(ali_aligner_cell *akt_cell, unsigned long akt_pos, unsigned long start_y, unsigned long end_y)
ALI_TLIST< ali_pathmap_up_pointer > left_starts
unsigned long column_length
void update_up(ali_aligner_column *akt_col, unsigned long start_y, unsigned long end_y)
float w_del_multi(unsigned long start, unsigned long end)
GB_write_int const char s