49 typedef ::util::StaticGraph<>
Graph;
109 std::vector<int>* node_equivalence_classes_io,
110 std::vector<std::unique_ptr<SparsePermutation>>* generators,
111 std::vector<int>* factorized_automorphism_group_size,
135 std::vector<int>* new_singletons_or_null);
140 inline int NumNodes()
const {
return graph_.num_nodes(); }
152 std::vector<int> flattened_reverse_adj_lists_;
153 std::vector<int> reverse_adj_list_index_;
173 std::unique_ptr<SparsePermutation> FindOneSuitablePermutation(
176 absl::Span<
const std::unique_ptr<SparsePermutation>>
177 generators_found_so_far,
178 absl::Span<
const std::vector<int>> permutations_displacing_node);
189 int first_image_node;
190 std::vector<int> remaining_pruned_image_nodes;
192 int num_parts_before_trying_to_map_base_node;
196 int min_potential_mismatching_part_index;
198 SearchState(
int bn,
int in,
int np,
int mi)
200 first_image_node(in),
201 num_parts_before_trying_to_map_base_node(np),
202 min_potential_mismatching_part_index(mi) {}
204 std::string DebugString()
const;
206 std::vector<SearchState> search_states_;
222 bool ConfirmFullMatchOrFindNextMappingDecision(
223 const DynamicPartition& base_partition,
224 const DynamicPartition& image_partition,
225 const DynamicPermutation& current_permutation_candidate,
226 int* min_potential_mismatching_part_index_io,
int* next_base_node,
227 int* next_image_node)
const;
234 void PruneOrbitsUnderPermutationsCompatibleWithPartition(
235 const DynamicPartition& partition,
236 absl::Span<
const std::unique_ptr<SparsePermutation>> all_permutations,
237 absl::Span<const int> permutation_indices, std::vector<int>*
nodes);
242 DynamicPermutation tmp_dynamic_permutation_;
243 mutable std::vector<bool> tmp_node_mask_;
244 std::vector<int> tmp_degree_;
245 std::vector<int> tmp_stack_;
246 std::vector<std::vector<int>> tmp_nodes_with_degree_;
247 MergingPartition tmp_partition_;
248 std::vector<const SparsePermutation*> tmp_compatible_permutations_;
251 struct Stats :
public StatsGroup {
254 initialization_time(
"a Initialization", this),
255 initialization_refine_time(
"b ┗╸Refine", this),
256 invariant_dive_time(
"c Invariant Dive", this),
257 main_search_time(
"d Main Search", this),
258 invariant_unroll_time(
"e ┣╸Dive unroll", this),
259 permutation_output_time(
"f ┣╸Permutation output", this),
260 search_time(
"g ┗╸FindOneSuitablePermutation()", this),
261 search_time_fail(
"h ┣╸Fail", this),
262 search_time_success(
"i ┣╸Success", this),
263 initial_search_refine_time(
"j ┣╸Initial refine", this),
264 search_refine_time(
"k ┣╸Further refines", this),
265 quick_compatibility_time(
"l ┣╸Compatibility checks", this),
266 quick_compatibility_fail_time(
"m ┃ ┣╸Fail", this),
267 quick_compatibility_success_time(
"n ┃ ┗╸Success", this),
268 dynamic_permutation_refinement_time(
269 "o ┣╸Dynamic permutation refinement", this),
270 map_election_std_time(
271 "p ┣╸Mapping election / full match detection", this),
272 map_election_std_mapping_time(
"q ┃ ┣╸Mapping elected", this),
273 map_election_std_full_match_time(
"r ┃ ┗╸Full Match", this),
274 automorphism_test_time(
"s ┣╸[Upon full match] Automorphism check",
276 automorphism_test_fail_time(
"t ┃ ┣╸Fail", this),
277 automorphism_test_success_time(
"u ┃ ┗╸Success", this),
278 search_finalize_time(
"v ┣╸[Upon auto success] Finalization", this),
279 dynamic_permutation_undo_time(
280 "w ┣╸[Upon auto fail, full] Dynamic permutation undo", this),
282 "x ┣╸[Upon auto fail, partial] Mapping re-election", this),
283 non_singleton_search_time(
"y ┃ ┗╸Non-singleton search", this),
284 backtracking_time(
"z ┗╸Backtracking", this),
285 pruning_time(
"{ ┗╸Pruning", this),
286 search_depth(
"~ Search Stats: search_depth", this) {}
288 TimeDistribution initialization_time;
289 TimeDistribution initialization_refine_time;
290 TimeDistribution invariant_dive_time;
291 TimeDistribution main_search_time;
292 TimeDistribution invariant_unroll_time;
293 TimeDistribution permutation_output_time;
294 TimeDistribution search_time;
295 TimeDistribution search_time_fail;
296 TimeDistribution search_time_success;
297 TimeDistribution initial_search_refine_time;
298 TimeDistribution search_refine_time;
299 TimeDistribution quick_compatibility_time;
300 TimeDistribution quick_compatibility_fail_time;
301 TimeDistribution quick_compatibility_success_time;
302 TimeDistribution dynamic_permutation_refinement_time;
303 TimeDistribution map_election_std_time;
304 TimeDistribution map_election_std_mapping_time;
305 TimeDistribution map_election_std_full_match_time;
306 TimeDistribution automorphism_test_time;
307 TimeDistribution automorphism_test_fail_time;
308 TimeDistribution automorphism_test_success_time;
309 TimeDistribution search_finalize_time;
310 TimeDistribution dynamic_permutation_undo_time;
311 TimeDistribution map_reelection_time;
312 TimeDistribution non_singleton_search_time;
313 TimeDistribution backtracking_time;
314 TimeDistribution pruning_time;
316 IntegerDistribution search_depth;
318 mutable Stats stats_;