17namespace layer1_foundations {
18namespace graph_theory {
52 std::ostream &ost_sol,
55 int f_v = (verbose_level >= 1);
60 cout <<
"rainbow_cliques::search" << endl;
104 cout <<
"rainbow_cliques::search "
105 "before init_restrictions" << endl;
119 cout <<
"rainbow_cliques::search before backtrack_search" << endl;
127 cout <<
"rainbow_cliques::search after backtrack_search" << endl;
131 cout <<
"depth : level_counter" << endl;
133 cout << setw(3) << i <<
" : " << setw(6)
153 cout <<
"rainbow_cliques::search before CF->get_solutions" << endl;
160 cout <<
"rainbow_cliques::search after CF->get_solutions" << endl;
183 cout <<
"rainbow_cliques::search done" << endl;
188 int current_clique_size,
int *current_clique,
189 int nb_pts,
int &reduced_nb_pts,
190 int *pt_list,
int *pt_list_inv,
191 int *candidates,
int verbose_level)
193 int f_v = (verbose_level >= 1);
194 int c, i, j, h, c0, c0_freq, pt;
197 cout <<
"rainbow_cliques::find_candidates "
198 "nb_pts = " << nb_pts << endl;
200 reduced_nb_pts = nb_pts;
207 for (i = 0; i < nb_pts; i++) {
210 cout <<
"rainbow_cliques::find_candidates pt >= nb_points" << endl;
216 cout <<
"rainbow_cliques::find_candidates c >= nb_colors" << endl;
223 cout <<
"rainbow_cliques::find_candidates color_frequency: ";
236 cout <<
"rainbow_cliques::find_candidates "
237 "satisfied color appears with positive "
239 cout <<
"current clique:";
262 cout <<
"rainbow_cliques::find_candidates "
263 "minimal color is " << c0 <<
" with frequency "
270 for (i = 0; i < nb_pts; i++) {
277 if (j < graph->nb_colors_per_vertex) {
278 candidates[h++] = pt_list[i];
286 cout <<
"rainbow_cliques::find_candidates h != c0_freq" << endl;
287 cout <<
"h=" << h << endl;
288 cout <<
"c0_freq=" << c0_freq << endl;
289 cout <<
"c0=" << c0 << endl;
290 cout <<
"nb_pts=" << nb_pts << endl;
294 cout <<
"current_clique_size=" << current_clique_size << endl;
295 cout <<
"color_frequency=";
298 cout <<
"f_color_satisfied=";
301 cout <<
"current clique:";
304 cout <<
"c : f_color_satisfied[c] : color_frequency[c]" << endl;
319 int *current_clique,
int verbose_level)
324 *
ost_sol << current_clique[i] <<
" ";
330 int *current_clique,
int verbose_level)
357 cout <<
"call_back_colored_graph_clique_found clique";
362 cout << i <<
" : " << pt <<
" : ";
366 if (j < R->graph->nb_colors_per_vertex) {
383 int current_clique_size,
int *current_clique,
384 int pt,
int verbose_level)
386 int f_v = (verbose_level >= 1);
394 cout <<
"call_back_colored_graph_add_point "
395 "color already satisfied" << endl;
401 cout <<
"call_back_colored_graph_add_point "
402 "add_point " << pt <<
" at depth "
403 << current_clique_size << endl;
408 int current_clique_size,
int *current_clique,
409 int pt,
int verbose_level)
411 int f_v = (verbose_level >= 1);
419 cout <<
"call_back_colored_graph_delete_point "
420 "color not satisfied" << endl;
426 cout <<
"call_back_colored_graph_delete_point "
427 "delete_point " << pt <<
" at depth "
428 << current_clique_size << endl;
433 int current_clique_size,
int *current_clique,
434 int nb_pts,
int &reduced_nb_pts,
435 int *pt_list,
int *pt_list_inv,
436 int *candidates,
int verbose_level)
439 int f_v = (verbose_level >= 1);
448 cout <<
"call_back_colored_graph_find_candidates "
449 "before call_back_additional_test_function" << endl;
452 current_clique_size, current_clique,
453 nb_pts, tmp_nb_points,
454 pt_list, pt_list_inv,
457 nb_pts = tmp_nb_points;
460 cout <<
"call_back_colored_graph_find_candidates "
461 "after call_back_additional_test_function "
462 "nb_pts = " << nb_pts << endl;
468 cout <<
"call_back_colored_graph_find_candidates "
469 "before R->find_candidates" << endl;
472 nb_pts, reduced_nb_pts,
473 pt_list, pt_list_inv,
474 candidates, verbose_level);
476 cout <<
"call_back_colored_graph_find_candidates "
477 "after R->find_candidates" << endl;
void set_print(std::ostream &ost, int *v, int len)
parameters that control the clique finding process
unsigned long int nb_decision_steps
unsigned long int nb_search_steps
void(* call_back_additional_test_function)(rainbow_cliques *R, void *user_data, int current_clique_size, int *current_clique, int nb_pts, int &reduced_nb_pts, int *pt_list, int *pt_list_inv, int verbose_level)
int f_has_additional_test_function
void * additional_test_function_data
int restrictions[CLIQUE_FINDER_CONTROL_MAX_RESTRICTIONS *3]
int f_output_solution_raw
finds all cliques of a certain size in a graph
unsigned long int counter
void backtrack_search(int depth, int verbose_level)
void * call_back_clique_found_data1
void init(clique_finder_control *Control, std::string &label, int n, int f_has_adj_list, int *adj_list_coded, int f_has_bitvector, data_structures::bitvector *Bitvec_adjacency, int verbose_level)
int(* call_back_is_adjacent)(clique_finder *CF, int pt1, int pt2, int verbose_level)
int(* call_back_find_candidates)(clique_finder *CF, int current_clique_size, int *current_clique, int nb_pts, int &reduced_nb_pts, int *pt_list, int *pt_list_inv, int *candidates, int verbose_level)
void get_solutions(int *&Sol, long int &nb_solutions, int &clique_sz, int verbose_level)
unsigned long int decision_step_counter
void(* call_back_delete_point)(clique_finder *CF, int current_clique_size, int *current_clique, int pt, int verbose_level)
clique_finder_control * Control
void(* call_back_clique_found)(clique_finder *CF, int verbose_level)
void open_tree_file(std::string &fname_base)
std::deque< std::vector< int > > solutions
void init_restrictions(int *restrictions, int verbose_level)
void(* call_back_add_point)(clique_finder *CF, int current_clique_size, int *current_clique, int pt, int verbose_level)
void(* call_back_after_reduction)(clique_finder *CF, int depth, int nb_points, int verbose_level)
a graph with a vertex coloring
data_structures::bitvector * Bitvec
to search for rainbow cliques in graphs
void clique_found_record_in_original_labels(int *current_clique, int verbose_level)
void clique_found(int *current_clique, int verbose_level)
int find_candidates(int current_clique_size, int *current_clique, int nb_pts, int &reduced_nb_pts, int *pt_list, int *pt_list_inv, int *candidates, int verbose_level)
void search(clique_finder_control *Control, colored_graph *graph, std::ostream &ost_sol, int verbose_level)
clique_finder_control * Control
int * color_chosen_at_depth
data_structures::int_vec * Int_vec
interface to system functions
#define Int_vec_zero(A, B)
#define Int_vec_print(A, B, C)
void call_back_colored_graph_clique_found(clique_finder *CF, int verbose_level)
void call_back_colored_graph_add_point(clique_finder *CF, int current_clique_size, int *current_clique, int pt, int verbose_level)
void call_back_colored_graph_delete_point(clique_finder *CF, int current_clique_size, int *current_clique, int pt, int verbose_level)
int call_back_colored_graph_find_candidates(clique_finder *CF, int current_clique_size, int *current_clique, int nb_pts, int &reduced_nb_pts, int *pt_list, int *pt_list_inv, int *candidates, int verbose_level)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects