38 #include "partition.hh" 39 #include "uintseqhash.hh" 70 virtual unsigned int add_vertex(
const unsigned int color = 0) = 0;
78 virtual void add_edge(
const unsigned int source,
const unsigned int target) = 0;
83 virtual unsigned int get_color(
const unsigned int vertex)
const = 0;
88 virtual void change_color(
const unsigned int vertex,
const unsigned int color) = 0;
97 assert(not in_search);
98 opt_use_failure_recording = active;
111 assert(not in_search);
112 opt_use_comprec = active;
148 virtual bool is_automorphism(
const std::vector<unsigned int>& perm)
const = 0;
175 const std::function<
void(
unsigned int n,
const unsigned int* aut)>& report =
nullptr,
176 const std::function<
bool()>& terminate =
nullptr);
204 const std::function<
void(
unsigned int n,
const unsigned int* aut)>& report =
nullptr,
205 const std::function<
bool()>& terminate =
nullptr);
222 virtual void write_dot(FILE *
const fp) = 0;
229 virtual void write_dot(
const char *
const file_name) = 0;
235 virtual unsigned int get_hash() = 0;
248 assert(not in_search);
249 opt_use_long_prune = active;
257 unsigned int verbose_level;
276 bool opt_use_failure_recording;
280 unsigned int failure_recording_fp_deviation;
285 bool opt_use_comprec;
288 unsigned int refine_current_path_certificate_index;
289 bool refine_compare_certificate;
290 bool refine_equal_to_first;
291 unsigned int refine_first_path_subcertificate_end;
292 int refine_cmp_to_best;
293 unsigned int refine_best_path_subcertificate_end;
295 static const unsigned int CERT_SPLIT = 0;
296 static const unsigned int CERT_EDGE = 1;
301 void cert_add(
const unsigned int v1,
302 const unsigned int v2,
303 const unsigned int v3);
310 void cert_add_redundant(
const unsigned int x,
311 const unsigned int y,
312 const unsigned int z);
317 bool opt_use_long_prune;
322 static const unsigned int long_prune_options_max_mem = 50;
327 static const unsigned int long_prune_options_max_stored_auts = 100;
329 unsigned int long_prune_max_stored_autss;
330 std::vector<std::vector<bool> *> long_prune_fixed;
331 std::vector<std::vector<bool> *> long_prune_mcrs;
332 std::vector<bool> long_prune_temp;
333 unsigned int long_prune_begin;
334 unsigned int long_prune_end;
338 void long_prune_init();
342 void long_prune_deallocate();
343 void long_prune_add_automorphism(
const unsigned int *aut);
344 std::vector<bool>& long_prune_get_fixed(
const unsigned int index);
345 std::vector<bool>& long_prune_allocget_fixed(
const unsigned int index);
346 std::vector<bool>& long_prune_get_mcrs(
const unsigned int index);
347 std::vector<bool>& long_prune_allocget_mcrs(
const unsigned int index);
352 void long_prune_swap(
const unsigned int i,
const unsigned int j);
358 virtual bool split_neighbourhood_of_unit_cell(
Partition::Cell *
const) = 0;
360 void refine_to_equitable();
371 bool do_refine_to_equitable();
373 unsigned int eqref_max_certificate_index;
377 bool compute_eqref_hash;
385 virtual bool is_equitable()
const = 0;
387 unsigned int *first_path_labeling;
388 unsigned int *first_path_labeling_inv;
389 Orbit first_path_orbits;
390 unsigned int *first_path_automorphism;
392 unsigned int *best_path_labeling;
393 unsigned int *best_path_labeling_inv;
394 Orbit best_path_orbits;
395 unsigned int *best_path_automorphism;
397 void update_labeling(
unsigned int *
const lab);
398 void update_labeling_and_its_inverse(
unsigned int *
const lab,
399 unsigned int *
const lab_inv);
400 void update_orbit_information(
Orbit &o,
const unsigned int *perm);
402 void reset_permutation(
unsigned int *perm);
404 std::vector<unsigned int> certificate_current_path;
405 std::vector<unsigned int> certificate_first_path;
406 std::vector<unsigned int> certificate_best_path;
408 unsigned int certificate_index;
409 virtual void initialize_certificate() = 0;
416 static void remove_duplicates(std::vector<unsigned int>& seq, std::vector<bool>& tmp);
418 virtual void remove_duplicate_edges() = 0;
419 virtual void make_initial_equitable_partition() = 0;
428 unsigned int splitting_element;
429 unsigned int certificate_index;
430 unsigned int subcertificate_length;
434 void search(
const bool canonical,
Stats &stats,
435 const std::function<
void(
unsigned int n,
const unsigned int* aut)>& report_function =
nullptr,
436 const std::function<
bool()>& terminate =
nullptr);
446 unsigned int cr_level;
454 unsigned int creation_level;
457 unsigned int discrete_cell_limit;
459 unsigned int next_cr_level;
461 unsigned int next_cep_index;
468 std::vector<CR_CEP> cr_cep_stack;
481 virtual bool nucr_find_first_component(
const unsigned int level) = 0;
482 virtual bool nucr_find_first_component(
const unsigned int level,
483 std::vector<unsigned int>& component,
484 unsigned int& component_elements,
490 std::vector<unsigned int> cr_component;
494 unsigned int cr_component_elements;
virtual unsigned int get_nof_vertices() const =0
Definition: abstractgraph.cc:35
virtual unsigned int get_color(const unsigned int vertex) const =0
Statistics returned by the bliss search algorithm.
Definition: stats.hh:31
const unsigned int * canonical_form(Stats &stats, const std::function< void(unsigned int n, const unsigned int *aut)> &report=nullptr, const std::function< bool()> &terminate=nullptr)
Definition: abstractgraph.cc:1757
virtual void write_dimacs(FILE *const fp)=0
virtual AbstractGraph * permute(const unsigned int *const perm) const =0
A min-heap of unsigned integers.
Definition: heap.hh:31
void set_verbose_file(FILE *const fp)
Definition: abstractgraph.cc:95
virtual void change_color(const unsigned int vertex, const unsigned int color)=0
Data structure for holding information about a cell in a Partition.
Definition: partition.hh:50
void find_automorphisms(Stats &stats, const std::function< void(unsigned int n, const unsigned int *aut)> &report=nullptr, const std::function< bool()> &terminate=nullptr)
Definition: abstractgraph.cc:1745
virtual bool is_automorphism(unsigned int *const perm) const =0
A class for representing orbit information.
Definition: orbit.hh:36
void set_failure_recording(const bool active)
Definition: abstractgraph.hh:96
virtual unsigned int add_vertex(const unsigned int color=0)=0
An abstract base class for different types of graphs.
Definition: abstractgraph.hh:47
A updatable hash for sequences of unsigned ints.
Definition: uintseqhash.hh:27
void set_component_recursion(const bool active)
Definition: abstractgraph.hh:110
A class for refinable, backtrackable ordered partitions.
Definition: partition.hh:44
virtual void write_dot(FILE *const fp)=0
void set_verbose_level(const unsigned int level)
Definition: abstractgraph.cc:89
void set_long_prune_activity(const bool active)
Definition: abstractgraph.hh:247
virtual void add_edge(const unsigned int source, const unsigned int target)=0
virtual unsigned int get_hash()=0