void npoint_mlpack::UnorderedMultiMatcher::ComputeBaseCase(NptNode* nodeA, NptNode* nodeB, std::vector<NptNode*>& nodeC_list, PartialResult& result) { std::vector<NptNode*> node_list(3); node_list[0] = nodeA; node_list[1] = nodeB; for (unsigned int i = 0; i < nodeC_list.size(); i++) { node_list[2] = nodeC_list[i]; NodeTuple this_tuple(node_list); ComputeBaseCase(this_tuple, result); } }
void make_node_list(int n){ first = node_list(n); }
void tex::fire_up(ptr c) { int n; bool wait; ptr prev_p; scal save_vfuzz; int save_vbadness; ptr save_split_top_skip; ptr p, q, r; if (type(best_page_break) == PENALTY_NODE) { set_output_penalty(penalty(best_page_break)); penalty(best_page_break) = INF_PENALTY; } else { set_output_penalty(INF_PENALTY); } if (bot_mark != null) { if (top_mark != null) delete_token_ref(top_mark); top_mark = bot_mark; add_token_ref(top_mark); delete_token_ref(first_mark); first_mark = null; } if (c == best_page_break) { best_page_break = null; } if (box(255) != null) { print_err(null_str); print_esc("box"); print("255 is not void"); help_box_255(); box_error(255); } insert_penalties = 0; save_split_top_skip = split_top_skip; if (holding_inserts <= 0) { r = link(page_ins_head); while (r != page_ins_head) { if (best_ins_ptr(r) != null) { n = subtype(r); ensure_vbox(n); if (box(n) == null) box(n) = new_null_box(); p = node_list(box(n)); while (link(p) != null) { p = link(p); } last_ins_ptr(r) = p; } r = link(r); } } q = hold_head; link(q) = null; prev_p = page_head; p = link(prev_p); while (p != best_page_break) { if (type(p) == INS_NODE) { if (holding_inserts <= 0) { wait = insert_box(p); link(prev_p) = link(p); link(p) = null; if (wait) { q = link(q) = p; incr(insert_penalties); } else { delete_glue_ref(split_top_ptr(p)); free_node(p, INS_NODE_SIZE); } p = prev_p; } } else if (type(p) == MARK_NODE) { if (first_mark == null) { first_mark = mark_ptr(p); add_token_ref(first_mark); } if (bot_mark != null) delete_token_ref(bot_mark); bot_mark = mark_ptr(p); add_token_ref(bot_mark); } prev_p = p; p = link(prev_p); } split_top_skip = save_split_top_skip; if (p != null) { if (link(contrib_head) == null) { if (nest_ptr == nest) { tail = page_tail; } else { contrib_tail = page_tail; } } link(page_tail) = link(contrib_head); link(contrib_head) = p; link(prev_p) = null; } save_vbadness = vbadness; save_vfuzz = vfuzz; vbadness = INF_BAD; vfuzz = MAX_DIMEN; box(255) = vpackage(link(page_head), best_size, EXACTLY, page_max_depth); vbadness = save_vbadness; vfuzz = save_vfuzz; if (last_glue != null) delete_glue_ref(last_glue); start_new_page(); if (q != hold_head) { link(page_head) = link(hold_head); page_tail = q; } r = link(page_ins_head); while (r != page_ins_head) { q = link(r); free_node(r, PAGE_INS_NODE_SIZE); r = q; } link(page_ins_head) = page_ins_head; if (top_mark != null && first_mark == null) { first_mark = top_mark; add_token_ref(top_mark); } if (output_routine != null) { if (dead_cycles >= max_dead_cycles) { print_err("Output loop---"); print_int(dead_cycles); print(" consecutive dead cycles"); help_dead_cycles(); error(); } else { output_active = TRUE; incr(dead_cycles); push_nest(); mode = -VMODE; prev_depth = IGNORE_DEPTH; mode_line = -line; begin_token_list(output_routine, OUTPUT_TEXT); new_save_level(OUTPUT_GROUP); normal_paragraph(); scan_left_brace(); return; } } if (link(page_head) != null) { if (link(contrib_head) == null) { if (nest_ptr == nest) { tail = page_tail; } else { contrib_tail = page_tail; } } else { link(page_tail) = link(contrib_head); } link(contrib_head) = link(page_head); link(page_head) = null; page_tail = page_head; } ship_out(box(255)); box(255) = null; }