Orbiter 2022
Combinatorial Objects
upstep_work.cpp
Go to the documentation of this file.
1// upstep_work.cpp
2//
3// Anton Betten
4// March 10, 2010
5
7#include "discreta/discreta.h"
10
11using namespace std;
12
13namespace orbiter {
14namespace layer4_classification {
15namespace poset_classification {
16
17
18static void print_coset_table(coset_table_entry *coset_table, int len);
19
21{
22 gen = NULL;
23 size = 0;
24 prev = 0;
25 prev_ex = 0;
26 cur = 0;
28 nb_fuse_cur = 0;
29 nb_ext_cur = 0;
30 f_debug = FALSE;
34 pt = 0;
35 pt_orbit_len = 0;
36 path = NULL;
37 O_prev = NULL;
38 O_cur = NULL;
39 G = NULL;
40 H = NULL;
41 coset = 0;
42 nb_cosets = 0;
44 coset_table = NULL;
45
46
47}
48
50{
51 int verbose_level = 0;
52 int f_v = (verbose_level >= 1);
53
54 if (f_v) {
55 cout << "upstep_work::~upstep_work" << endl;
56 }
57 if (G) {
58 if (f_v) {
59 cout << "upstep_work::~upstep_work "
60 "before FREE_OBJECT(G)" << endl;
61 }
63 G = NULL;
64 }
65 if (H) {
66 if (f_v) {
67 cout << "upstep_work::~upstep_work "
68 "before FREE_OBJECT(H)" << endl;
69 }
71 H = NULL;
72 }
73 if (coset_table) {
74 if (f_v) {
75 cout << "upstep_work::~upstep_work "
76 "before FREE_OBJECT(coset_table)" << endl;
77 }
79 coset_table = NULL;
80 }
81 if (path) {
82 if (f_v) {
83 cout << "upstep_work::~upstep_work "
84 "before FREE_int(path)" << endl;
85 }
87 path = NULL;
88 }
89 if (f_v) {
90 cout << "upstep_work::~upstep_work done" << endl;
91 }
92}
93
95 int size,
96 int prev,
97 int prev_ex,
98 int cur,
99 int f_debug,
100 int f_implicit_fusion,
101 int f_indicate_not_canonicals,
102 int verbose_level)
103// called from poset_classification::extend_node
104{
105 //verbose_level = 1;
106 int f_v = (verbose_level >= 1);
107 int i;
108
109 if (f_v) {
110 cout << "upstep_work::init size=" << size
111 << " prev=" << prev << " prev_ex="
112 << prev_ex << " cur=" << cur << endl;
113 }
122
124
125
126 if (O_prev->get_nb_of_extensions() > 25) {
127 mod_for_printing = 25;
128 }
129 if (O_prev->get_nb_of_extensions() > 50) {
130 mod_for_printing = 50;
131 }
132 if (O_prev->get_nb_of_extensions() > 100) {
133 mod_for_printing = 100;
134 }
135 if (O_prev->get_nb_of_extensions() > 500) {
136 mod_for_printing = 500;
137 }
138
139 path = NEW_int(size + 1);
140 path[size] = prev;
141 for (i = size - 1; i >= 0; i--) {
142 path[i] = gen->get_node(path[i + 1])->get_prev();
143 }
144 if (f_v) {
145 cout << "upstep_work::init path: ";
146 Int_vec_print(cout, path, size + 1);
147 cout << endl;
148 }
149 if (f_v) {
150 cout << "upstep_work::init done" << endl;
151 }
152}
153
155 int &nb_fuse_cur,
156 int &nb_ext_cur, int verbose_level)
157// called from poset_classification::extend_node
158// Calls handle_extension_fusion_type
159// or handle_extension_unprocessed_type
160//
161// Handles the extension 'cur_ex' in node 'prev'.
162// We are extending a set of size 'size' to a set of size 'size' + 1.
163// Calls poset_orbit_node::init_extension_node for the n e w node
164// that is (possibly) created
165{
166 int f_v = (verbose_level >= 1);
167 //int f_vv = (verbose_level >= 2);
168 //int f_vvv = (verbose_level >= 3);
169 int type;
170
171 if (f_v) {
173 cout << "upstep_work::handle_extension verbose_level = "
174 << verbose_level << endl;
175 cout << "prev=" << prev << " prev_ex=" << prev_ex << endl;
176 }
178 type = O_prev->get_E(prev_ex)->get_type();
179
180 if (f_v) {
182 cout << "type ";
183 print_extension_type(cout, type);
184 cout << endl;
185 }
186
187 if (type == EXTENSION_TYPE_FUSION) {
188 if (f_v) {
189 cout << "upstep_work::handle_extension fusion type" << endl;
190 }
191 handle_extension_fusion_type(verbose_level - 2);
192 nb_fuse_cur++;
193 }
194 else if (type == EXTENSION_TYPE_UNPROCESSED) {
195 if (f_v) {
196 cout << "upstep_work::handle_extension unprocessed type" << endl;
197 }
199 nb_ext_cur++;
200 }
201 else {
203 cout << endl;
204 cout << "upstep_work::handle_extension extension "
205 "not of unprocessed type, error" << endl;
206 cout << "type is ";
207 print_extension_type(cout, type);
208 cout << endl;
209 exit(1);
210 }
211 if (f_v) {
212 cout << "upstep_work::handle_extension prev=" << prev
213 << " prev_ex=" << prev_ex << " done" << endl;
214 }
215}
216
218// called from upstep_work::handle_extension
219// Handles the extension 'cur_ex' in node 'prev'.
220{
221 int f_v = (verbose_level >= 1);
222 int f_vv = (verbose_level >= 2);
223 //int f_vvv = (verbose_level >= 3);
224
225 // fusion node, nothing to do
226
227 if (f_v) {
229 cout << "upstep_work::handle_extension_fusion_type" << endl;
230 }
231 if (f_vv) {
232 long int *set;
233 set = NEW_lint(size + 1);
234 O_prev->store_set_to(gen, size - 1, set /*gen->S1*/);
235 // store_set_to(k) stores a set of size k+1
236 // so here we store the first size points of the set
237 // namely the current set.
238
239 // next we store the size+1 th point:
240 set[size] = pt; //gen->S1[size] = pt;
241 // so, we really have a set of size size + 1
242
244 cout << " point " << pt << " ";
245 orbiter_kernel_system::Orbiter->Lint_vec->set_print(cout, set /*gen->S1*/, size + 1);
246 cout << " is a fusion node, skipping" << endl;
247 FREE_lint(set);
248#if 0
249 if (f_vvv) {
250 if (gen->f_print_function) {
251 (*gen->print_function)(cout, size + 1,
252 gen->S1, gen->print_function_data);
253 }
254 gen->generator_apply_isomorphism_no_transporter(
255 size, size + 1, prev, prev_ex,
256 gen->S1, gen->S2,
257 verbose_level - 3);
258 cout << "fusion elt: " << endl;
259 //A->element_print_quick(Elt1, cout);
260 cout << "maps it to: ";
261 int_set_print(cout, gen->S2, size + 1);
262 cout << endl;
263 if (gen->f_print_function) {
264 (*gen->print_function)(cout, size + 1,
265 gen->S2, gen->print_function_data);
266 }
267 }
268#endif
269 }
270}
271
273// called from upstep_work::handle_extension
274// calls init_extension_node
275{
276 int f_v = (verbose_level >= 1);
277 int f_vv = (verbose_level >= 2);
278 int f_vvv = (verbose_level >= 3);
279
280 int ret, type;
281
282 if (f_v) {
284 cout << "upstep_work::handle_extension_unprocessed_type" << endl;
285 cout << "verbose_level = " << verbose_level << endl;
286 }
287 type = O_prev->get_E(prev_ex)->get_type();
288
289 if (f_vv) {
291 cout << "with point " << pt << " : " << endl;
292 }
293 if (type != EXTENSION_TYPE_UNPROCESSED) {
294 cout << "extension not of unprocessed type, error" << endl;
295 cout << "type is ";
296 print_extension_type(cout, type);
297 cout << endl;
298 exit(1);
299 }
300
301 // process the node and create a n e w set orbit at level size + 1:
302
304
305 size++;
306 // here, size is incremented so we need to subtract
307 // one if we want to use gen->print_level_extension_info
308
309 if (f_vv) {
311 cout << "with point " << pt << ", pt_orbit_len=" << pt_orbit_len
312 << " : before init_extension_node" << endl;
313 }
314
315 ret = init_extension_node(verbose_level - 3);
316
317 if (f_vv) {
319 cout << "with point " << pt << " : after init_extension_node ";
320 cout << "nb_cosets_processed=" << nb_cosets_processed << endl;
321 }
322 if (f_vvv) {
323 cout << "upstep_work::handle_extension_unprocessed_type "
324 "coset_table:" << endl;
325 print_coset_table(coset_table, nb_cosets_processed);
326 }
327 if (ret) {
328 if (f_vv) {
329 cout << "init_extension_node returns TRUE" << endl;
330 }
331 }
332 else {
333 if (f_vv) {
334 cout << "init_extension_node returns FALSE, "
335 "the set is not canonical" << endl;
336 //cout << "u=" << gen->split_case << " @(" << prev
337 //<< "," << prev_ex << ") not canonical" << endl;
338 }
339 if (f_vv) {
340 cout << "the set is not canonical, we skip it" << endl;
341 }
342 cout << "setting type of extension to "
343 "EXTENSION_TYPE_NOT_CANONICAL" << endl;
345 cur--;
346 cout << "reducing cur to " << cur << endl;
347 }
348
349
350 cur++;
351 size--;
352 // the original value of size is restored
353
354 if (f_vvv) {
355 cout << "cur=" << cur << endl;
356 }
357
358 if (f_v) {
360 cout << "with point " << pt << " done" << endl;
361 cout << "upstep_work::handle_extension_unprocessed_type done" << endl;
362 }
363}
364
366// size has been incremented
367// Called from upstep_work::handle_extension_unprocessed_type
368// Calls upstep_subspace_action or upstep_for_sets,
369// depending on the type of action
370// then changes the type of the extension to EXTENSION_TYPE_EXTENSION
371//
372// Establishes a n e w node at depth 'size'
373// (i.e., a set of size 'size') as an extension
374// of a previous node (prev) at depth size - 1
375// with respect to a given point (pt).
376// This function is to be called for the next
377// free poset_orbit_node which will
378// become the descendant of the previous node (prev).
379// the extension node corresponds to the point pt.
380// returns FALSE if the set is not canonical
381// (provided f_indicate_not_canonicals is TRUE)
382{
383
384#if 0
385 if (prev == 12 && prev_ex == 3) {
386 cout << "upstep_work::init_extension_node we are at node (12,3)" << endl;
387 verbose_level += 10;
388 }
389#endif
390
391#if 0
392 if (cur == 26) {
393 cout << "upstep_work::init_extension_node Node=26" << endl;
394 }
395#endif
396
397 //longinteger_domain D;
398 int f_v = (verbose_level >= 1);
399 int f_vv = (verbose_level >= 2);
400 int f_vvv = (verbose_level >= 3);
401
402
403
404 if (f_v) {
406 cout << "upstep_work::init_extension_node cur=" << cur
407 << " size=" << size
408 << " verbose_level=" << verbose_level << endl;
409 }
410
411 if (cur == -1) {
413 cout << "upstep_work::init_extension_node cur=" << cur << endl;
414 exit(1);
415 }
416
417 O_cur = gen->get_node(cur);
418
419
420#if 0
421 O_cur->freeself();
422 O_cur->node = cur;
423 O_cur->prev = prev;
424 O_cur->pt = pt;
425#else
426 O_cur->init_node(cur, prev, pt, verbose_level);
427#endif
428
429 //if (f_v) {cout << "after freeself" << endl;}
430 O_cur->store_set(gen, size - 1);
431 // stores a set of size 'size' to gen->S
432
433 if (f_v) {
435 cout << "upstep_work::init_extension_node "
436 "initializing Node " << cur << " ";
437 Lint_vec_print(cout, gen->get_S(), size);
438 cout << " f_indicate_not_canonicals="
440 cout << " verbose_level=" << verbose_level;
441 cout << endl;
442 }
443
444 if (f_vv) {
445 cout << "point " << pt << " lies in an orbit of length "
446 << pt_orbit_len
447 << " verbose_level = " << verbose_level << endl;
448 }
449
450
451 if (G) {
452 cout << "upstep_work::init_extension_node "
453 "G is already allocated" << endl;
454 exit(1);
455 }
456 if (H) {
457 cout << "upstep_work::init_extension_node "
458 "H is already allocated" << endl;
459 exit(1);
460 }
463
464
465 if (f_v) {
468 cout << "upstep_work::init_extension_node "
469 "before O_cur->init_extension_node_prepare_G" << endl;
470 }
472 prev, prev_ex, size, *G, go_G,
473 verbose_level - 4);
474 if (f_v) {
477 cout << "upstep_work::init_extension_node "
478 "after O_cur->init_extension_node_prepare_G" << endl;
479 }
480
481
482
483 if (f_vv) {
486 cout << endl;
487 }
488 if (f_vvv) {
491 }
492 }
493 if (f_vv) {
494 cout << "(orbit length = " << pt_orbit_len << ")" << endl;
495 }
496
498 // currently processing
500
501
502 //group H;
503
504
505 if (f_v) {
508 cout << "upstep_work::init_extension_node "
509 "before O_cur->init_extension_node_prepare_H" << endl;
510 }
511
513 prev, prev_ex, size,
514 *G, go_G,
515 *H, go_H,
517 verbose_level - 2);
518
519
520#if 0
521 if (cur == 26) {
522 cout << "upstep_work::init_extension_node Node=26" << endl;
523 cout << "go_G=" << go_G << endl;
524 cout << "go_H=" << go_H << endl;
525 }
526#endif
527
528 if (f_v) {
531 cout << "upstep_work::init_extension_node "
532 "after O_cur->init_extension_node_prepare_H" << endl;
533 }
534
535
536 if (f_v) {
538 Lint_vec_print(cout, gen->get_S(), size);
539 cout << "upstep_work::init_extension_node calling upstep" << endl;
540 }
541
543 if (f_v) {
545 Lint_vec_print(cout, gen->get_S(), size);
546 cout << "upstep_work::init_extension_node "
547 "calling upstep_subspace_action" << endl;
548 }
549 if (!upstep_subspace_action(verbose_level - 2)) {
550
552 if (f_vv) {
553 cout << "the set is not canonical" << endl;
554 }
555 return FALSE;
556 }
557 cout << "upstep_subspace_action returns FALSE, "
558 "the set is not canonical, this should not happen"
559 << endl;
560 exit(1);
561 }
562 if (f_v) {
564 Lint_vec_print(cout, gen->get_S(), size);
565 cout << "upstep_work::init_extension_node "
566 "after upstep_subspace_action" << endl;
567 }
568 }
569 else {
570 if (f_v) {
572 Lint_vec_print(cout, gen->get_S(), size);
573 cout << "upstep_work::init_extension_node calling "
574 "upstep_for_sets, verbose_level = "
575 << verbose_level - 2 << endl;
576 }
577 if (!upstep_for_sets(verbose_level - 2)) {
579 if (f_vv) {
580 cout << "the set is not canonical" << endl;
581 }
582 return FALSE;
583 }
584 cout << "upstep returns FALSE, the set is not canonical, "
585 "this should not happen" << endl;
586 exit(1);
587 }
588 if (f_v) {
590 Lint_vec_print(cout, gen->get_S(), size);
591 cout << "upstep_work::init_extension_node after "
592 "upstep_for_sets" << endl;
593 }
594 }
595 if (f_vv) {
597 Lint_vec_print(cout, gen->get_S(), size);
598 cout << "extension with point " << pt << " : " << endl;
599 cout << "after upstep_for_sets/upstep_subspace_action" << endl;
600 //print_coset_table(coset_table, nb_cosets_processed);
601 }
602
604 EXTENSION_TYPE_EXTENSION, 0/* verbose_level*/);
605
606
607 if (f_vv) {
609 Lint_vec_print(cout, gen->get_S(), size);
610 cout << "_{";
611 H->print_group_order(cout);
612 cout << "}" << endl;
613 }
614
615 groups::strong_generators *Strong_gens;
616
618 Strong_gens->init_from_sims(H->S, 0);
619
620#if 0
621 if (cur == 26) {
622 longinteger_object go;
623 cout << "upstep_work::init_extension_node Node=26 before "
624 "upstep_subspace_action group order=";
625 Strong_gens->group_order(go);
626 cout << go;
627 cout << endl;
628 cout << "generators are:" << endl;
629 Strong_gens->print_generators();
630 cout << "tl:";
631 int_vec_print(cout, Strong_gens->tl, gen->A->base_len);
632 cout << endl;
633 }
634#endif
635
636 O_cur->store_strong_generators(gen, Strong_gens);
637 FREE_OBJECT(Strong_gens);
638
639
640 if (f_v) {
642
645 Lint_vec_print(cout, gen->get_S(), size);
646 cout << "_{";
647 cout << go;
648 cout << "} (double check)" << endl;
649 cout << "upstep_work::init_extension_node done" << endl;
650 }
651 return TRUE;
652}
653
654int upstep_work::upstep_for_sets(int verbose_level)
655// This routine is called from upstep_work::init_extension_node
656// It is testing a set of size 'size'.
657// The newly added point is in gen->S[size - 1]
658// returns FALSE if the set is not canonical
659// (provided f_indicate_not_canonicals is TRUE)
660{
661 int f_v = (verbose_level >= 1);
662 int f_vv = (verbose_level >= 2);
663 int f_vvv = (verbose_level >= 3);
664 int f_v4 = (verbose_level >= 4);
665 int f_v5 = (verbose_level >= 5);
666 groups::schreier up_orbit;
667 int possible_image;
668 int *aut, idx;
669 trace_result r;
670 actions::action *A_by_restriction;
671 int final_node, final_ex;
673
674 O_cur->store_set(gen, size - 1); // stores a set of size 'size'
675 if (f_v) {
677 cout << "upstep for set ";
679 cout << " verbose_level=" << verbose_level;
680 cout << " f_indicate_not_canonicals="
681 << f_indicate_not_canonicals << endl;
682 //cout << endl;
683 }
684 A_by_restriction = gen->get_A2()->create_induced_action_by_restriction(
685 NULL /*sims *old_G */,
686 size, gen->get_S(),
687 FALSE /* f_induce_action */,
688 0 /*verbose_level - 2*/);
689
690 // the newly added point:
691 if (gen->get_S()[size - 1] != pt) {
692 cout << "upstep_work::upstep_for_sets fatal: "
693 "gen->S[size - 1] != pt" << endl;
694 exit(1);
695 }
696
697 if (f_v) {
699 cout << "initializing up_orbit with restricted action ";
700 A_by_restriction->print_info();
701 }
702 up_orbit.init(A_by_restriction, verbose_level - 2);
703 //up_orbit.init(gen->A2);
704 if (f_v) {
706 cout << "initializing up_orbit with generators" << endl;
707 }
708 up_orbit.init_generators(*H->SG, verbose_level - 2);
709
710
711
712 if (f_v) {
714 cout << "computing orbit of point " << pt << endl;
715 }
716 up_orbit.compute_point_orbit(size - 1 /*pt*/, 0);
717 // the orbits of the group H
718 // up_orbit will be extended as soon
719 // as n e w automorphisms are found
720
721
722
723 if (f_vv) {
724 cout << "upstep_work::upstep_for_sets "
725 "initializing union_find:" << endl;
726 }
727 UF.init(A_by_restriction, 0 /*verbose_level - 8*/);
728 if (f_vv) {
729 cout << "upstep_work::upstep_for_sets "
730 "adding generators to union_find:" << endl;
731 }
732 UF.add_generators(H->SG, 0 /*verbose_level - 8*/);
733 if (f_vv) {
734 cout << "upstep_work::upstep_for_sets "
735 "initializing union_find done" << endl;
736 }
737 if (f_vvv) {
738 UF.print();
739 }
740
741
742 if (coset_table) {
743 cout << "upstep_work::upstep_for_sets "
744 "coset_table is allocated" << endl;
745 exit(1);
746 }
747 nb_cosets = size;
750
751 for (coset = 0; coset < size - 1; coset++) {
752 if (f_v) {
753 cout << "upstep_work::upstep_for_sets "
754 "coset=" << coset << " / " << nb_cosets << endl;
755 }
756 // for all the previous (=old) points
757 possible_image = gen->get_S()[coset];
758 if (f_vv) {
760 cout << " we are trying to map " << possible_image << " to " << pt << endl;
761 }
762
763
764 idx = UF.ancestor(coset);
765 if (idx < coset) {
766 //gen->nb_times_trace_was_saved++;
767 if (f_vv) {
769 cout << "coset " << coset << " / " << nb_cosets
770 << " is at " << idx << " which has already "
771 "been done, so we save one trace" << endl;
772 }
773 continue;
774 }
775
776
777
778
779 if (f_v4) {
781 cout << " orbit length upstep so far: " << up_orbit.orbit_len[0]
782 << " checking possible image " << possible_image << endl;
783 }
784
785
786 // initialize set[0] and transporter[0] for the tracing
788#if 0
789 for (h = 0; h < size; h++) {
790 gen->set[0][h] = gen->S[h];
791 }
792#endif
793 gen->get_set_i(0)[coset] = pt;
794 gen->get_set_i(0)[size - 1] = possible_image;
796
797
798 if (f_v4) {
800 cout << "exchanged set: ";
802 cout << endl;
803 cout << "upstep_work::upstep_for_sets "
804 "calling recognize, verbose_level="
805 << verbose_level << endl;
806 }
807
808 int nb_times_image_of_called0 = gen->get_A()->ptr->nb_times_image_of_called;
809 int nb_times_mult_called0 = gen->get_A()->ptr->nb_times_mult_called;
810 int nb_times_invert_called0 = gen->get_A()->ptr->nb_times_invert_called;
811 int nb_times_retrieve_called0 = gen->get_A()->ptr->nb_times_retrieve_called;
812
813 r = recognize(final_node,
814 final_ex,
815 TRUE /*f_tolerant*/,
816 verbose_level - 4);
817
818 if (f_v) {
819 cout << "upstep_work::upstep_for_sets coset "
820 << coset << " / " << nb_cosets
821 << " recognize returns "
822 << trace_result_as_text(r) << endl;
823 }
824
825
826
832 gen->get_A()->ptr->nb_times_image_of_called - nb_times_image_of_called0;
834 gen->get_A()->ptr->nb_times_mult_called - nb_times_mult_called0;
836 gen->get_A()->ptr->nb_times_invert_called - nb_times_invert_called0;
838 gen->get_A()->ptr->nb_times_retrieve_called - nb_times_retrieve_called0;
840
841 if (f_vvv) {
843 cout << "upstep_work::upstep_for_sets calling find_automorphism "
844 "returns " << trace_result_as_text(r) << endl;
845 }
846
847
848 if (r == found_automorphism) {
849 aut = gen->get_transporter()->ith(size);
850 if (f_vvv) {
852 cout << "upstep_work::upstep_for_sets found automorphism "
853 "mapping " << possible_image << " to " << pt << endl;
854 //gen->A->element_print_as_permutation(aut, cout);
855 if (gen->allowed_to_show_group_elements() && f_v5) {
856 gen->get_A()->element_print_quick(aut, cout);
857 cout << endl;
858 }
859 }
860 if (gen->get_A2()->element_image_of(possible_image, aut, 0) != pt) {
861 cout << "upstep_work::upstep_for_sets image of possible_"
862 "image is not pt" << endl;
863 exit(1);
864 }
865 UF.add_generator(aut, 0 /*verbose_level - 5*/);
866 up_orbit.extend_orbit(aut, verbose_level - 5);
867 if (f_vvv) {
868 cout << "upstep_work::upstep_for_sets n e w orbit length "
869 "upstep = " << up_orbit.orbit_len[0] << endl;
870 }
871 }
872 else if (r == not_canonical) {
874 if (f_vvv) {
875 cout << "upstep_work::upstep_for_sets not canonical"
876 << endl;
877 }
878 FREE_OBJECT(A_by_restriction);
879 return FALSE;
880 }
881#if 0
883 cout << "upstep_work::upstep_for_sets fatal: find_automorphism_"
884 "by_tracing returns not_canonical, this should "
885 "not happen" << endl;
886 exit(1);
887#endif
888 }
889 else if (r == no_result_extension_not_found) {
890 if (f_vvv) {
891 cout << "upstep_work::upstep_for_sets no_result_"
892 "extension_not_found" << endl;
893 }
894 }
895 else if (r == no_result_fusion_node_installed) {
896 if (f_vvv) {
897 cout << "upstep_work::upstep_for_sets no_result_"
898 "fusion_node_installed" << endl;
899 }
900 }
902 if (f_vvv) {
903 cout << "upstep_work::upstep_for_sets no_result_"
904 "fusion_node_already_installed" << endl;
905 }
906 }
907 } // next j
908 if (f_v) {
910 cout << "upstep_work::upstep_for_sets upstep orbit "
911 "length for set ";
913 cout << " is " << up_orbit.orbit_len[0] << endl;
914
915 cout << "coset_table of length " << nb_cosets_processed
916 << ":" << endl;
917 print_coset_table(coset_table, nb_cosets_processed);
918 }
920 int *tl_extension = NEW_int(gen->get_A()->base_len());
921 int f_tolerant = TRUE;
922
923 if (f_vvv) {
924 cout << "upstep_work::upstep_for_sets H->S->transitive_"
925 "extension_tolerant up_orbit.orbit_len[0]="
926 << up_orbit.orbit_len[0] << endl;
927 }
929 up_orbit,
930 SG_extension, tl_extension, f_tolerant,
931 0 /*verbose_level - 3*/);
933 H->init_strong_generators(SG_extension, tl_extension, verbose_level - 2);
934
935 FREE_int(tl_extension);
936
937 if (f_v) {
939 cout << "upstep_work::upstep_for_sets done "
940 "nb_cosets_processed = " << nb_cosets_processed << endl;
941 }
942 FREE_OBJECT(A_by_restriction);
943 return TRUE;
944}
945
946
947
948#if 0
949void upstep_work::print_level_extension_info_original_size()
950{
952}
953#endif
954
956{
958}
959
961{
964}
965
966
967
968static void print_coset_table(coset_table_entry *coset_table, int len)
969{
970 int i;
971
972 cout << "coset table" << endl;
973 cout << "i : coset : node : ex : nb_times_mult : nb_times_invert : "
974 "nb_times_retrieve : trace_result" << endl;
975 for (i = 0; i < len; i++) {
976 cout << setw(3) << i << " : "
977 << setw(5) << coset_table[i].coset << " : "
978 << setw(5) << coset_table[i].node << " : "
979 << setw(5) << coset_table[i].ex << " : ("
980 << coset_table[i].nb_times_mult_called << "/"
981 << coset_table[i].nb_times_invert_called << "/"
982 << coset_table[i].nb_times_retrieve_called << ") : "
983 << setw(5) << trace_result_as_text((trace_result)
984 coset_table[i].type) << endl;
985 }
986}
987
988
989}}}
990
991
992
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
a permutation group in a fixed action.
Definition: actions.h:99
void element_print_quick(void *elt, std::ostream &ost)
Definition: action_cb.cpp:353
void element_one(void *elt, int verbose_level)
Definition: action_cb.cpp:224
action * create_induced_action_by_restriction(groups::sims *S, int size, long int *set, int f_induce, int verbose_level)
long int element_image_of(long int a, void *elt, int verbose_level)
Definition: action_cb.cpp:198
void init_strong_generators(vector_ge &SG, int *tl, int verbose_level)
a union find data structure (used in the poset classification algorithm)
void init(actions::action *A, int verbose_level)
Definition: union_find.cpp:41
void add_generators(vector_ge *gens, int verbose_level)
Definition: union_find.cpp:123
Schreier trees for orbits of groups on points.
Definition: groups.h:839
void extend_orbit(int *elt, int verbose_level)
Definition: schreier.cpp:901
void init_generators(data_structures_groups::vector_ge &generators, int verbose_level)
Definition: schreier.cpp:373
void compute_point_orbit(int pt, int verbose_level)
Definition: schreier.cpp:1256
void init(actions::action *A, int verbose_level)
Definition: schreier.cpp:308
int transitive_extension_tolerant(schreier &O, data_structures_groups::vector_ge &SG, int *tl, int f_tolerant, int verbose_level)
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_from_sims(groups::sims *S, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
void stabilizer_order(int node, ring_theory::longinteger_object &go)
void print_level_extension_coset_info(int prev_level, int prev, int cur_extension, int coset, int nb_cosets)
void change_extension_type(int level, int node, int cur_ext, int type, int verbose_level)
void init_node(int node, int prev, long int pt, int verbose_level)
void init_extension_node_prepare_H(poset_classification *gen, int prev, int prev_ex, int size, data_structures_groups::group_container &G, ring_theory::longinteger_object &go_G, data_structures_groups::group_container &H, ring_theory::longinteger_object &go_H, long int pt, int pt_orbit_len, int verbose_level)
void store_strong_generators(poset_classification *gen, groups::strong_generators *Strong_gens)
void init_extension_node_prepare_G(poset_classification *gen, int prev, int prev_ex, int size, data_structures_groups::group_container &G, ring_theory::longinteger_object &go_G, int verbose_level)
void store_set_to(poset_classification *gen, int i, long int *to)
void init(poset_classification *gen, int size, int prev, int prev_ex, int cur, int f_debug, int f_implicit_fusion, int f_indicate_not_canonicals, int verbose_level)
Definition: upstep_work.cpp:94
void handle_extension(int &nb_fuse_cur, int &nb_ext_cur, int verbose_level)
trace_result recognize(int &final_node, int &final_ex, int f_tolerant, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define FREE_OBJECTS(p)
Definition: foundations.h:652
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define NEW_OBJECTS(type, n)
Definition: foundations.h:639
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects
#define EXTENSION_TYPE_PROCESSING
#define EXTENSION_TYPE_FUSION
#define EXTENSION_TYPE_UNPROCESSED
#define EXTENSION_TYPE_NOT_CANONICAL
#define EXTENSION_TYPE_EXTENSION
a helper class for the poset classification algorithm to build up a coset transversal for the automor...
int coset
int node
int type
int nb_times_invert_called
int nb_times_mult_called
int ex
int nb_times_retrieve_called
int nb_times_image_of_called