Orbiter 2022
Combinatorial Objects
nauty_interface_with_group.cpp
Go to the documentation of this file.
1/*
2 * nauty_interface_with_group.cpp
3 *
4 * Created on: Feb 18, 2019
5 * Author: betten
6 */
7
8
9
10
12#include "group_actions.h"
13
14
15using namespace std;
16
17
18namespace orbiter {
19namespace layer3_group_actions {
20namespace actions {
21
22
24{
25
26}
27
29{
30
31}
32
34 graph_theory::colored_graph *CG, int verbose_level)
35{
36 int f_v = (verbose_level >= 1);
37 action *A;
38 int *labeling;
39
40 if (f_v) {
41 cout << "nauty_interface_with_group::create_automorphism_group_of_colored_graph" << endl;
42 }
43
44 labeling = NEW_int(CG->nb_points);
45
46
48 CG->nb_points,
49 TRUE /* f_bitvec */, CG->Bitvec, NULL /* int *Adj */,
50 CG->point_color,
51 labeling,
52 verbose_level);
53
54 FREE_int(labeling);
55
56 if (f_v) {
57 cout << "nauty_interface_with_group::create_automorphism_group_of_colored_graph done" << endl;
58 }
59 return A;
60}
61
63 graph_theory::colored_graph *CG, int *labeling, int verbose_level)
64{
65 int f_v = (verbose_level >= 1);
66 action *A;
67
68 if (f_v) {
69 cout << "nauty_interface_with_group::create_automorphism_group_and_"
70 "canonical_labeling_of_colored_graph_object" << endl;
71 }
72
74 CG->nb_points,
75 TRUE /* f_bitvec */, CG->Bitvec, NULL /* int *Adj */,
76 CG->point_color,
77 labeling,
78 verbose_level);
79
80 if (f_v) {
81 cout << "nauty_interface_with_group::create_automorphism_group_and_"
82 "canonical_labeling_of_colored_graph_object done" << endl;
83 }
84 return A;
85}
86
88 int n, int f_bitvec, data_structures::bitvector *Bitvec, int *Adj,
89 int *vertex_colors,
90 int *labeling,
91 int verbose_level)
92{
93 int f_v = (verbose_level >= 1);
94 action *A;
96 int *parts;
97 int nb_parts;
98 int i, j, k, n1, N, f_on = 0, c, nb_edges;
100
101 if (f_v) {
102 cout << "nauty_interface_with_group::create_automorphism_group_"
103 "and_canonical_labeling_of_colored_graph" << endl;
104 }
105
107
108 C.init(vertex_colors, n, FALSE, 0);
109
110
111 if (f_v) {
112 cout << "nauty_interface_with_group::create_automorphism_group_"
113 "and_canonical_labeling_of_colored_graph "
114 "nb_types = " << C.nb_types << endl;
115 }
116
117
118 n1 = n + C.nb_types;
119
120 if (f_v) {
121 cout << "nauty_interface_with_group::create_automorphism_group_"
122 "and_canonical_labeling_of_colored_graph "
123 "n1 = " << n1 << endl;
124 }
125
126 N = (n1 * (n1 - 1)) >> 1;
128 Adj1->allocate(N);
129
130 nb_edges = 0;
131 for (i = 0; i < n; i++) {
132 for (j = i + 1; j < n; j++) {
133 f_on = FALSE;
134 k = Combi.ij2k(i, j, n);
135 if (f_bitvec) {
136 if (Bitvec->s_i(k)) {
137 f_on = TRUE;
138 }
139 }
140 else {
141 f_on = Adj[i * n + j];
142 }
143 if (f_on) {
144 k = Combi.ij2k(i, j, n1);
145 Adj1->m_i(k, 1);
146 nb_edges++;
147 }
148 }
149 }
150 for (i = 0; i < n; i++) {
151 c = C.class_of(i);
152 j = n + c;
153 k = Combi.ij2k(i, j, n1);
154 Adj1->m_i(k, 1);
155 }
156
157
158 nb_parts = 1 + C.nb_types;
159 parts = NEW_int(nb_parts);
160 parts[0] = n;
161 for (i = 0; i < C.nb_types; i++) {
162 parts[1 + i] = 1;
163 }
164
165
166#if 0
167 if (f_v) {
168 cout << "nauty_interface_with_group::create_automorphism_group_"
169 "and_canonical_labeling_of_colored_graph "
170 "before create_automorphism_group_of_graph_with_"
171 "partition_and_labeling" << endl;
172 cout << "nb_edges=" << nb_edges << endl;
173 cout << "extended adjacency matrix:" << endl;
174 int a;
175 for (i = 0; i < n1; i++) {
176 for (j = 0; j < n1; j++) {
177 if (i == j) {
178 a = 0;
179 }
180 else if (i < j) {
181 k = Combi.ij2k(i, j, n1);
182 a = bitvector_s_i(Adj1, k);
183 }
184 else {
185 k = Combi.ij2k(j, i, n1);
186 a = bitvector_s_i(Adj1, k);
187 }
188 cout << a << " ";
189 }
190 cout << endl;
191 }
192 }
193#endif
194
196 n1, TRUE, Adj1, NULL,
197 nb_parts, parts, labeling, verbose_level);
198 if (f_v) {
199 cout << "nauty_interface_with_group::create_automorphism_group_"
200 "and_canonical_labeling_of_colored_graph done" << endl;
201 }
202
203 FREE_int(parts);
204 FREE_OBJECT(Adj1);
205 return A;
206}
207
209 int n, data_structures::bitvector *Bitvec,
210 int verbose_level)
211{
212 int f_v = (verbose_level >= 1);
213 int parts[1];
214 action *A;
215 int *labeling;
216
217 parts[0] = n;
218 labeling = NEW_int(n);
219
220 if (f_v) {
221 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_bitvec" << endl;
222 }
224 n, TRUE, Bitvec, NULL,
225 1, parts, labeling, verbose_level);
226 if (f_v) {
227 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_bitvec done" << endl;
228 }
229 FREE_int(labeling);
230 return A;
231}
232
234 int n,
235 int f_bitvector, data_structures::bitvector *Bitvec, int *Adj,
236 int nb_parts, int *parts,
237 int *labeling,
238 int verbose_level)
239// labeling[n]
240{
241 int f_v = (verbose_level >= 1);
242 int f_vv = (verbose_level >= 2);
243 int *partitions;
244 int i, u, a;
245 nauty_interface Nau;
247
248
250
251 NO->N = n;
252
253 if (f_vv) {
254 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
255 "before NO->allocate" << endl;
256 }
257
258 NO->allocate(n, verbose_level - 2);
259
260
261 partitions = NEW_int(n);
262
263 if (f_v) {
264 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling "
265 "creating partition" << endl;
266 }
267 for (i = 0; i < n; i++) {
268 partitions[i] = 1;
269 }
270 u = 0;
271 for (i = 0; i < nb_parts; i++) {
272 a = parts[i];
273 u += a;
274 partitions[u - 1] = 0;
275 }
276 if (u != n) {
277 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling "
278 "partition does not add up" << endl;
279 exit(1);
280 }
281
282 if (f_bitvector) {
283 if (f_v) {
284 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_"
285 "partition_and_labeling "
286 "before nauty_interface_graph_bitvec" << endl;
287 }
288 Nau.nauty_interface_graph_bitvec(n, Bitvec,
289 //labeling,
290 partitions,
291 NO,
292 verbose_level);
293 }
294 else {
295 Nau.nauty_interface_graph_int(n, Adj,
296 //labeling,
297 partitions,
298 NO,
299 verbose_level);
300 }
301
302 for (i = 0; i < n; i++) {
303 labeling[i] = NO->canonical_labeling[i];
304 }
305
306
307 if (f_v) {
308 if (TRUE /*(input_no % 500) == 0*/) {
309 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_"
310 "partition_and_labeling: "
311 "The group order is = " << *NO->Ago << " = ";
312 //cout << "transversal length: ";
314 cout << endl;
315 NO->print_stats();
316 }
317 }
318
319
320#if 0
321 for (i = 0; i < n; i++) {
322 j = labeling[i];
323 labeling_inv[j] = i;
324 }
325#endif
326
327 if (f_vv) {
328 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling: "
329 "labeling:" << endl;
330 cout << "skipped" << endl;
331 //Orbiter->Int_vec.print(cout, labeling, n);
332 cout << endl;
333 //cout << "labeling_inv:" << endl;
334 //int_vec_print(cout, labeling_inv, n);
335 //cout << endl;
336
337 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling: "
338 "Base:" << endl;
339 Int_vec_print(cout, NO->Base, NO->Base_length);
340 cout << endl;
341
342 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling: "
343 "generators:" << endl;
344 cout << "skipped" << endl;
345 //Orbiter->Int_vec.print_integer_matrix_width(cout, NO->Aut, NO->Aut_counter, n, n, 2);
346 }
347
348
349
350 action *A;
351
352
353 A = NEW_OBJECT(action);
354
355 if (f_v) {
356 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling "
357 "before A->init_permutation_group_from_nauty_output" << endl;
358 }
360 verbose_level - 2);
361 if (f_v) {
362 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling "
363 "after A->init_permutation_group_from_nauty_output" << endl;
364 }
365
366 if (f_v) {
367 cout << "nauty_interface_with_group::create_automorphism_group_of_graph_with_partition_and_labeling: "
368 "created action ";
369 A->print_info();
370 cout << endl;
371 }
372
373 FREE_OBJECT(NO);
374 FREE_int(partitions);
375
376 return A;
377}
378
379
380
382 int *Adj, int n, int verbose_level)
383{
384 int f_v = (verbose_level >= 1);
385 int f_vv = (verbose_level >= 2);
386
387 if (f_v) {
388 cout << "nauty_interface_with_group::create_automorphism_group_of_graph n=" << n << endl;
389 }
390
391 int *partition;
392 int i;
393 nauty_interface Nau;
395
396
398
399 NO->N = n;
400
401 if (f_vv) {
402 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
403 "before NO->allocate" << endl;
404 }
405
406 NO->allocate(n, verbose_level - 2);
407
408
409 partition = NEW_int(n);
410
411 if (f_v) {
412 cout << "nauty_interface_with_group::create_automorphism_group_of_graph" << endl;
413 }
414 for (i = 0; i < n; i++) {
415 partition[i] = 1;
416 }
417 partition[n - 1] = 0;
418
419 if (f_v) {
420 cout << "nauty_interface_with_group::create_automorphism_group_of_graph "
421 "before Nau.nauty_interface_graph_int" << endl;
422 }
423 Nau.nauty_interface_graph_int(n, Adj,
424 partition,
425 NO,
426 verbose_level);
427 if (f_v) {
428 cout << "nauty_interface_with_group::create_automorphism_group_of_graph "
429 "after Nau.nauty_interface_graph_int Ago=" << *NO->Ago << endl;
430 }
431
432 action *A;
433
434 A = NEW_OBJECT(action);
435
436 if (f_v) {
437 cout << "nauty_interface_with_group::create_automorphism_group_of_graph "
438 "before A->init_permutation_group_from_nauty_output" << endl;
439 }
441 verbose_level - 2);
442 if (f_v) {
443 cout << "nauty_interface_with_group::create_automorphism_group_of_graph "
444 "after A->init_permutation_group_from_nauty_output" << endl;
445 }
446
447 if (f_v) {
448 cout << "nauty_interface_with_group::create_automorphism_group_of_graph: "
449 "created action ";
450 A->print_info();
451 cout << endl;
452 }
453
454 FREE_OBJECT(NO);
455
456 FREE_int(partition);
457 if (f_v) {
458 cout << "nauty_interface_with_group::create_automorphism_group_of_graph done" << endl;
459 }
460 return A;
461}
462
463
465 int *Adj, int n, int *labeling,
466 int verbose_level)
467// labeling[n]
468{
469 int f_v = (verbose_level >= 1);
470 int f_vv = (verbose_level >= 2);
471
472 if (f_v) {
473 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
474 "n=" << n << endl;
475 }
476
477 int *partition;
478 //longinteger_object Ago;
479 int i;
480 nauty_interface Nau;
482
483
485
486 NO->N = n;
487
488 if (f_vv) {
489 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
490 "before NO->allocate" << endl;
491 }
492
493 NO->allocate(n, verbose_level - 2);
494
495 if (f_vv) {
496 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
497 "after NO->allocate" << endl;
498 }
499
500 partition = NEW_int(n);
501
502 if (f_v) {
503 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
504 "initializing partition" << endl;
505 }
506 for (i = 0; i < n; i++) {
507 partition[i] = 1;
508 }
509 partition[n - 1] = 0;
510
511 if (f_v) {
512 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
513 "before Nau.nauty_interface_graph_int" << endl;
514 }
515 Nau.nauty_interface_graph_int(n, Adj,
516 partition,
517 NO,
518 verbose_level);
519 if (f_v) {
520 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
521 "after Nau.nauty_interface_graph_int" << endl;
522 }
523
524
525 for (i = 0; i < n; i++) {
526 labeling[i] = NO->canonical_labeling[i];
527 }
528
529
530 action *A;
531
532 A = NEW_OBJECT(action);
533
534 if (f_v) {
535 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
536 "before A->init_permutation_group_from_nauty_output" << endl;
537 }
539 verbose_level - 2);
540 if (f_v) {
541 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
542 "after A->init_permutation_group_from_nauty_output" << endl;
543 }
544
545 if (f_v) {
546 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph: "
547 "created action ";
548 A->print_info();
549 cout << endl;
550 }
551
552 FREE_OBJECT(NO);
553
554 FREE_int(partition);
555 if (f_v) {
556 cout << "nauty_interface_with_group::create_automorphism_group_and_canonical_labeling_of_graph "
557 "done" << endl;
558 }
559 return A;
560}
561
562#if 0
563action *nauty_interface_with_group::create_automorphism_group_of_block_system(
564 int nb_points, int nb_blocks, int block_size, long int *Blocks,
565 int verbose_level)
566{
567 int f_v = (verbose_level >= 1);
568 int *M;
569 action *A;
570 int i, j, h;
571
572 if (f_v) {
573 cout << "nauty_interface_with_group::create_automorphism_group_of_block_system" << endl;
574 }
575 M = NEW_int(nb_points * nb_blocks);
576 Orbiter->Int_vec.zero(M, nb_points * nb_blocks);
577 for (j = 0; j < nb_blocks; j++) {
578 for (h = 0; h < block_size; h++) {
579 i = Blocks[j * block_size + h];
580 M[i * nb_blocks + j] = 1;
581 }
582 }
583 A = create_automorphism_group_of_incidence_matrix(
584 nb_points, nb_blocks, M, verbose_level);
585
586 FREE_int(M);
587 if (f_v) {
588 cout << "nauty_interface_with_group::create_automorphism_group_of_block_system done" << endl;
589 }
590 return A;
591}
592
593action *nauty_interface_with_group::create_automorphism_group_of_collection_of_two_block_systems(
594 int nb_points,
595 int nb_blocks1, int block_size1, long int *Blocks1,
596 int nb_blocks2, int block_size2, long int *Blocks2,
597 int verbose_level)
598{
599 int f_v = (verbose_level >= 1);
600 int *M;
601 action *A;
602 int i, j, h;
603 int nb_cols;
604 int nb_rows;
605
606 if (f_v) {
607 cout << "nauty_interface_with_group::create_automorphism_group_of_collection_"
608 "of_two_block_systems" << endl;
609 }
610 nb_cols = nb_blocks1 + nb_blocks2 + 1;
611 nb_rows = nb_points + 2;
612
613 M = NEW_int(nb_rows * nb_cols);
614 Orbiter->Int_vec.zero(M, nb_rows * nb_cols);
615
616 // first system:
617 for (j = 0; j < nb_blocks1; j++) {
618 for (h = 0; h < block_size1; h++) {
619 i = Blocks1[j * block_size1 + h];
620 M[i * nb_cols + j] = 1;
621 }
622 i = nb_points + 0;
623 M[i * nb_cols + j] = 1;
624 }
625 // second system:
626 for (j = 0; j < nb_blocks2; j++) {
627 for (h = 0; h < block_size2; h++) {
628 i = Blocks2[j * block_size2 + h];
629 M[i * nb_cols + nb_blocks1 + j] = 1;
630 }
631 i = nb_points + 1;
632 M[i * nb_cols + nb_blocks1 + j] = 1;
633 }
634 // the extra column:
635 for (i = 0; i < 2; i++) {
636 M[(nb_points + i) * nb_cols + nb_blocks1 + nb_blocks2] = 1;
637 }
638
639 A = create_automorphism_group_of_incidence_matrix(
640 nb_rows, nb_cols, M, verbose_level);
641
642 FREE_int(M);
643 if (f_v) {
644 cout << "nauty_interface_with_group::create_automorphism_group_of_collection_"
645 "of_two_block_systems done" << endl;
646 }
647 return A;
648}
649
650action *nauty_interface_with_group::create_automorphism_group_of_incidence_matrix(
651 int m, int n, int *Mtx,
652 int verbose_level)
653{
654 int f_v = (verbose_level >= 1);
655 int nb_inc;
656 int *X;
657 action *A;
658 int i, j, h;
659
660 if (f_v) {
661 cout << "nauty_interface_with_group::create_automorphism_group_of_incidence_matrix" << endl;
662 }
663 nb_inc = 0;
664 for (i = 0; i < m; i++) {
665 for (j = 0; j < n; j++) {
666 if (Mtx[i * n + j]) {
667 nb_inc++;
668 }
669 }
670 }
671 X = NEW_int(nb_inc);
672 h = 0;
673 for (i = 0; i < m; i++) {
674 for (j = 0; j < n; j++) {
675 if (Mtx[i * n + j]) {
676 X[h++] = i * n + j;
677 }
678 }
679 }
680 A = create_automorphism_group_of_incidence_structure_low_level(
681 m, n, nb_inc, X, verbose_level);
682
683 FREE_int(X);
684 if (f_v) {
685 cout << "nauty_interface_with_group::create_automorphism_group_of_incidence_matrix done" << endl;
686 }
687 return A;
688}
689
690action *nauty_interface_with_group::create_automorphism_group_of_incidence_structure(
691 incidence_structure *Inc,
692 int verbose_level)
693{
694 int f_v = (verbose_level >= 1);
695 action *A;
696 int m, n, nb_inc;
697 int *X;
698 int *data;
699 int nb;
700 int i, j, h, a;
701
702 if (f_v) {
703 cout << "nauty_interface_with_group::create_automorphism_group_of_incidence_structure" << endl;
704 }
705 m = Inc->nb_points();
706 n = Inc->nb_lines();
707 nb_inc = Inc->get_nb_inc();
708 X = NEW_int(nb_inc);
709 data = NEW_int(n);
710 h = 0;
711 for (i = 0; i < m; i++) {
712 nb = Inc->get_lines_on_point(data, i, 0 /* verbose_level */);
713 for (j = 0; j < nb; j++) {
714 a = data[j];
715 X[h++] = i * m + a;
716 }
717 }
718 if (h != nb_inc) {
719 cout << "nauty_interface_with_group::create_automorphism_group_of_incidence_structure "
720 "h != nb_inc" << endl;
721 exit(1);
722 }
723
724 A = create_automorphism_group_of_incidence_structure_low_level(
725 m, n, nb_inc, X,
726 verbose_level - 1);
727
728 FREE_int(X);
729 FREE_int(data);
730 return A;
731}
732
733action *nauty_interface_with_group::create_automorphism_group_of_incidence_structure_low_level(
734 int m, int n, int nb_inc, int *X,
735 int verbose_level)
736{
737 int f_v = (verbose_level >= 1);
738 int *partition;
739 int i;
740 action *A;
741
742 if (f_v) {
743 cout << "nauty_interface_with_group::create_automorphism_group_"
744 "of_incidence_structure_low_level" << endl;
745 }
746
747 partition = NEW_int(m + n);
748 for (i = 0; i < m + n; i++) {
749 partition[i] = 1;
750 }
751
752 partition[m - 1] = 0;
753
754 A = create_automorphism_group_of_incidence_structure_with_partition(
755 m, n, nb_inc, X, partition,
756 verbose_level);
757
758 FREE_int(partition);
759 if (f_v) {
760 cout << "nauty_interface_with_group::create_automorphism_group_"
761 "of_incidence_structure_low_level done" << endl;
762 }
763 return A;
764}
765
766action *nauty_interface_with_group::create_automorphism_group_of_incidence_structure_with_partition(
767 int m, int n, int nb_inc, int *X, int *partition,
768 int verbose_level)
769{
770 int f_v = (verbose_level >= 1);
771 int f_v10 = (verbose_level >= 10);
772 int *labeling; //, *labeling_inv;
773 int *Aut;
774 int *Base, *Transversal_length;
775 long int *Base_lint;
776 int Aut_counter = 0, Base_length = 0;
777 longinteger_object Ago;
778 nauty_interface Nau;
779
780
781 //m = # rows
782 //n = # cols
783
784 Aut = NEW_int((m+n) * (m+n));
785 Base = NEW_int(m+n);
786 Base_lint = NEW_lint(m+n);
787 Transversal_length = NEW_int(m + n);
788
789 if (f_v) {
790 cout << "nauty_interface_with_group::create_automorphism_group_of_"
791 "incidence_structure_with_partition" << endl;
792 }
793
794 labeling = NEW_int(m + n);
795 //labeling_inv = NEW_int(m + n);
796
797 Nau.nauty_interface_int(m, n, X, nb_inc,
798 labeling, partition,
799 Aut, Aut_counter,
800 Base, Base_length,
801 Transversal_length, Ago);
802
803 if (f_v) {
804 if (TRUE /*(input_no % 500) == 0*/) {
805 cout << "nauty_interface_with_group::create_automorphism_group_of_"
806 "incidence_structure_with_partition: "
807 "The group order is = " << Ago << endl;
808 }
809 }
810
811 Orbiter->Int_vec.copy_to_lint(Base, Base_lint, Base_length);
812
813#if 0
814 for (i = 0; i < m + n; i++) {
815 j = labeling[i];
816 labeling_inv[j] = i;
817 }
818#endif
819
820 if (f_v10) {
821 cout << "nauty_interface_with_group::create_automorphism_group_of_"
822 "incidence_structure_with_partition: "
823 "labeling:" << endl;
824 Orbiter->Int_vec.print(cout, labeling, m + n);
825 cout << endl;
826 //cout << "labeling_inv:" << endl;
827 //int_vec_print(cout, labeling_inv, m + n);
828 //cout << endl;
829
830 cout << "nauty_interface_with_group::create_automorphism_group_of_"
831 "incidence_structure_with_partition: "
832 "Base:" << endl;
833 Orbiter->Lint_vec.print(cout, Base_lint, Base_length);
834 cout << endl;
835
836 cout << "nauty_interface_with_group::create_automorphism_group_of_"
837 "incidence_structure_with_partition: "
838 "generators:" << endl;
840 Aut, Aut_counter, m + n, m + n, 2);
841 }
842
843
844
845 action *A;
846 longinteger_object ago;
847
848
849 A = NEW_OBJECT(action);
850
851 Ago.assign_to(ago);
852 //ago.create(Ago, __FILE__, __LINE__);
853 A->init_permutation_group_from_generators(m + n,
854 TRUE, ago,
855 Aut_counter, Aut,
856 Base_length, Base_lint,
857 verbose_level - 2);
858
859 if (f_v) {
860 cout << "nauty_interface_with_group::create_automorphism_group_of_"
861 "incidence_structure_with_partition: "
862 "created action ";
863 A->print_info();
864 cout << endl;
865 }
866
867 FREE_int(Aut);
868 FREE_int(Base);
869 FREE_lint(Base_lint);
870 FREE_int(Transversal_length);
871 FREE_int(labeling);
872
873 return A;
874}
875
876void nauty_interface_with_group::test_self_dual_self_polar(int input_no,
877 int m, int n, int nb_inc, int *X,
878 int &f_self_dual, int &f_self_polar,
879 int verbose_level)
880{
881 int M, N, i, j, h, Nb_inc, a;
882 int *Mtx, *Y;
883
884 if (m != n) {
885 f_self_dual = FALSE;
886 f_self_polar = FALSE;
887 return;
888 }
889 M = 2 * m;
890 N = 2 + nb_inc;
891 Mtx = NEW_int(M * N);
892 Y = NEW_int(M * N);
893 for (i = 0; i < M * N; i++) {
894 Mtx[i] = 0;
895 }
896 for (i = 0; i < m; i++) {
897 Mtx[i * N + 0] = 1;
898 }
899 for (i = 0; i < m; i++) {
900 Mtx[(m + i) * N + 1] = 1;
901 }
902 for (h = 0; h < nb_inc; h++) {
903 a = X[h];
904 i = a / n;
905 j = a % n;
906 Mtx[i * N + 2 + h] = 1;
907 Mtx[(m + j) * N + 2 + h] = 1;
908 }
909 Nb_inc = 0;
910 for (i = 0; i < M * N; i++) {
911 if (Mtx[i]) {
912 Y[Nb_inc++] = i;
913 }
914 }
915
916 do_self_dual_self_polar(input_no,
917 M, N, Nb_inc, Y, f_self_dual, f_self_polar,
918 verbose_level - 1);
919
920 FREE_int(Mtx);
921 FREE_int(Y);
922}
923
924
925void nauty_interface_with_group::do_self_dual_self_polar(int input_no,
926 int m, int n, int nb_inc, int *X,
927 int &f_self_dual, int &f_self_polar,
928 int verbose_level)
929{
930 int f_v = (verbose_level >= 1);
931 int f_vv = (verbose_level >= 2);
932 int *labeling; //, *labeling_inv;
933 int *Aut;
934 int *Base, *Transversal_length, *partitions;
935 long int *Base_lint;
936 int Aut_counter = 0, Base_length = 0;
937 longinteger_object Ago;
938 int i; //, j;
939 nauty_interface Nau;
940
941 //m = # rows
942 //n = # cols
943
944 if (ODD(m)) {
945 f_self_dual = f_self_polar = FALSE;
946 return;
947 }
948 Aut = NEW_int((m+n) * (m+n));
949 Base = NEW_int(m+n);
950 Base_lint = NEW_lint(m+n);
951 Transversal_length = NEW_int(m + n);
952 partitions = NEW_int(m + n);
953
954 if (f_v) {
955 if ((input_no % 500) == 0) {
956 cout << "nauty_interface_with_group::do_self_dual_self_polar input_no=" << input_no << endl;
957 }
958 }
959 for (i = 0; i < m + n; i++) {
960 partitions[i] = 1;
961 }
962
963#if 0
964 for (i = 0; i < PB.P.ht; i++) {
965 j = PB.P.startCell[i] + PB.P.cellSize[i] - 1;
966 partitions[j] = 0;
967 }
968#endif
969
970#if 0
971 j = 0;
972 for (i = 0; i < nb_row_parts; i++) {
973 l = row_parts[i];
974 partitions[j + l - 1] = 0;
975 j +=l;
976 }
977 for (i = 0; i < nb_col_parts; i++) {
978 l = col_parts[i];
979 partitions[j + l - 1] = 0;
980 j +=l;
981 }
982#endif
983
984 labeling = NEW_int(m + n);
985 //labeling_inv = NEW_int(m + n);
986
987 Nau.nauty_interface_int(m, n, X, nb_inc,
988 labeling, partitions, Aut, Aut_counter,
989 Base, Base_length, Transversal_length, Ago);
990
991 if (f_vv) {
992 if ((input_no % 500) == 0) {
993 cout << "The group order is = " << Ago << endl;
994 }
995 }
996
997 Orbiter->Int_vec.copy_to_lint(Base, Base_lint, Base_length);
998
999#if 0
1000 for (i = 0; i < m + n; i++) {
1001 j = labeling[i];
1002 labeling_inv[j] = i;
1003 }
1004#endif
1005
1006 int *aut;
1007 int *p_aut;
1008 int h, a, b, c, m_half;
1009
1010 m_half = m >> 1;
1011 aut = NEW_int(Aut_counter * m);
1012 for (h = 0; h < Aut_counter; h++) {
1013 for (i = 0; i < m; i++) {
1014 aut[h * m + i] = Aut[h * (m + n) + i];
1015 }
1016 }
1017 f_self_dual = FALSE;
1018 f_self_polar = FALSE;
1019 for (h = 0; h < Aut_counter; h++) {
1020 p_aut = aut + h * m;
1021
1022 a = p_aut[0];
1023 if (a >= m_half ) {
1024 f_self_dual = TRUE;
1025 if (f_v) {
1026 cout << "no " << input_no << " is self dual" << endl;
1027 }
1028 break;
1029 }
1030 }
1031
1032#if 0
1033
1034 int *AUT;
1035 int *BASE;
1036
1037 AUT = NEW_int(Aut_counter * (m + n));
1038 BASE = NEW_int(Base_length);
1039 for (h = 0; h < Aut_counter; h++) {
1040 for (i = 0; i < m + n; i++) {
1041 j = labeling_inv[i];
1042 j = Aut[h * (m + n) + j];
1043 j = labeling[j];
1044 AUT[h * (m + 1) + i] = j;
1045 }
1046 }
1047 for (i = 0; i < Base_length; i++) {
1048 j = Base[i];
1049 j = labeling[j];
1050 BASE[i] = j;
1051 }
1052#endif
1053
1054 action A;
1055 longinteger_object ago;
1056
1057
1058
1059 Ago.assign_to(ago);
1060
1061 //ago.create(Ago, __FILE__, __LINE__);
1062 A.init_permutation_group_from_generators(m + n,
1063 TRUE, ago,
1064 Aut_counter, Aut,
1065 Base_length, Base_lint,
1066 verbose_level);
1067
1068 cout << "created action ";
1069 A.print_info();
1070 cout << endl;
1071
1072
1073 if (f_self_dual) {
1074
1075
1076 sims *S;
1077 longinteger_object go;
1078 int goi;
1079 int *Elt;
1080
1081 S = A.Sims;
1082 S->group_order(go);
1083 goi = go.as_int();
1084 Elt = NEW_int(A.elt_size_in_int);
1085
1086 cout << "the group order is: " << goi << endl;
1087 for (i = 0; i < goi; i++) {
1088 S->element_unrank_lint(i, Elt);
1089 if (Elt[0] < m_half) {
1090 continue; // not a duality
1091 }
1092
1093 for (a = 0; a < m_half; a++) {
1094 b = Elt[a];
1095 c = Elt[b];
1096 if (c != a)
1097 break;
1098 }
1099 if (a == m_half) {
1100 cout << "found a polarity:" << endl;
1101 A.element_print(Elt, cout);
1102 cout << endl;
1103 f_self_polar = TRUE;
1104 break;
1105 }
1106 }
1107
1108
1109 FREE_int(Elt);
1110 }
1111
1112
1113
1114
1115 FREE_int(aut);
1116 FREE_int(Aut);
1117 FREE_int(Base);
1118 FREE_lint(Base_lint);
1119 FREE_int(Transversal_length);
1120 FREE_int(partitions);
1121 FREE_int(labeling);
1122 //FREE_int(labeling_inv);
1123 //FREE_int(AUT);
1124 //FREE_int(BASE);
1125}
1126
1127void nauty_interface_with_group::add_configuration_graph(ofstream &g,
1128 int m, int n, int nb_inc, int *X, int f_first,
1129 int verbose_level)
1130{
1131 incidence_structure Inc;
1132 int *joining_table;
1133 int *M1;
1134 int i, j, h, nb_joined_pairs, nb_missing_pairs;
1135 int n1, nb_inc1;
1136 action *A;
1137 longinteger_object ago;
1138 combinatorics_domain Combi;
1139
1140 A = create_automorphism_group_of_incidence_structure_low_level(
1141 m, n, nb_inc, X,
1142 verbose_level - 2);
1143 A->group_order(ago);
1144
1145 Inc.init_by_incidences(m, n, nb_inc, X, verbose_level);
1146 joining_table = NEW_int(m * m);
1147 for (i = 0; i < m * m; i++) {
1148 joining_table[i] = FALSE;
1149 }
1150 nb_joined_pairs = 0;
1151 for (i = 0; i < m; i++) {
1152 for (j = i + 1; j < m; j++) {
1153 for (h = 0; h < n; h++) {
1154 if (Inc.get_ij(i, h) && Inc.get_ij(j, h)) {
1155 joining_table[i * m + j] = TRUE;
1156 joining_table[j * m + i] = TRUE;
1157 nb_joined_pairs++;
1158 }
1159 }
1160 }
1161 }
1162 nb_missing_pairs = Combi.int_n_choose_k(m, 2) - nb_joined_pairs;
1163 n1 = n + nb_missing_pairs;
1164 M1 = NEW_int(m * n1);
1165 for (i = 0; i < m * n1; i++) {
1166 M1[i] = 0;
1167 }
1168 for (i = 0; i < m; i++) {
1169 for (j = 0; j < n; j++) {
1170 M1[i * n1 + j] = Inc.get_ij(i, j);
1171 }
1172 }
1173 h = 0;
1174 for (i = 0; i < m; i++) {
1175 for (j = i + 1; j < m; j++) {
1176 if (joining_table[i * m + j] == FALSE) {
1177 M1[i * n1 + n + h] = 1;
1178 M1[j * n1 + n + h] = 1;
1179 h++;
1180 }
1181 }
1182 }
1183 if (f_first) {
1184 nb_inc1 = 0;
1185 for (i = 0; i < m; i++) {
1186 for (j = 0; j < n1; j++) {
1187 if (M1[i * n1 + j]) {
1188 nb_inc1++;
1189 }
1190 }
1191 }
1192 g << m << " " << n1 << " " << nb_inc1 << endl;
1193 }
1194 for (i = 0; i < m; i++) {
1195 for (j = 0; j < n1; j++) {
1196 if (M1[i * n1 + j]) {
1197 g << i * n1 + j << " ";
1198 }
1199 }
1200 }
1201 g << ago << endl;
1202
1203 FREE_int(joining_table);
1204 FREE_int(M1);
1205 FREE_OBJECT(A);
1206}
1207#endif
1208
1209
1212 action *&A_perm,
1213 int verbose_level)
1214{
1215 int f_v = (verbose_level >= 1);
1216 int f_vv = (verbose_level >= 2);
1217 //int f_vvv = (verbose_level >= 3);
1218
1219
1220 if (f_v) {
1221 cout << "nauty_interface_with_group::automorphism_group_as_permutation_group" << endl;
1222 }
1223 A_perm = NEW_OBJECT(action);
1224
1225
1226 if (f_v) {
1227 cout << "nauty_interface_with_group::automorphism_group_as_permutation_group "
1228 "before init_permutation_group_from_generators" << endl;
1229 }
1231 verbose_level - 2);
1232 if (f_v) {
1233 cout << "nauty_interface_with_group::automorphism_group_as_permutation_group "
1234 "after init_permutation_group_from_generators" << endl;
1235 }
1236
1237 if (f_vv) {
1238 cout << "nauty_interface_with_group::automorphism_group_as_permutation_group "
1239 "create_automorphism_group_of_incidence_structure: created action ";
1240 A_perm->print_info();
1241 cout << endl;
1242 }
1243
1244
1245 if (f_v) {
1246 cout << "nauty_interface_with_group::automorphism_group_as_permutation_group done" << endl;
1247 }
1248}
1249
1251 actions::action *A_linear,
1254 actions::action *&A_perm,
1256 int verbose_level)
1257{
1258 int f_v = (verbose_level >= 1);
1259 int f_vv = (verbose_level >= 2);
1260 int f_vvv = (verbose_level >= 3);
1261
1262
1263 if (f_v) {
1264 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group" << endl;
1265 }
1266
1267 //action *A_perm;
1268
1269 int d;
1270
1271 d = A_linear->matrix_group_dimension();
1272
1273
1274 if (f_v) {
1275 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group before automorphism_group_as_permutation_group" << endl;
1276 }
1277
1279 //SG,
1280 NO,
1281 A_perm,
1282 verbose_level);
1283
1284 if (f_v) {
1285 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group after automorphism_group_as_permutation_group" << endl;
1286 }
1287
1288 //action *A_linear;
1289
1290 //A_linear = A;
1291
1292 if (A_linear == NULL) {
1293 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1294 "A_linear == NULL" << endl;
1295 exit(1);
1296 }
1297
1298 data_structures_groups::vector_ge *gens; // permutations from nauty
1299 data_structures_groups::vector_ge *gens1; // matrices
1300 int g, frobenius, pos;
1301 int *Mtx;
1302 int *Elt1;
1303
1304 gens = A_perm->Strong_gens->gens;
1305
1307 gens1->init(A_linear, verbose_level - 2);
1308 gens1->allocate(gens->len, verbose_level - 2);
1309 Elt1 = NEW_int(A_linear->elt_size_in_int);
1310
1311 Mtx = NEW_int(d * d + 1); // leave space for frobenius
1312
1313 pos = 0;
1314 for (g = 0; g < gens->len; g++) {
1315 if (f_vv) {
1316 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1317 "strong generator " << g << ":" << endl;
1318 //A_perm->element_print(gens->ith(g), cout);
1319 cout << endl;
1320 }
1321
1322 if (A_perm->reverse_engineer_semilinear_map(P,
1323 gens->ith(g), Mtx, frobenius,
1324 0 /*verbose_level - 2*/)) {
1325
1326 Mtx[d * d] = frobenius;
1327 A_linear->make_element(Elt1, Mtx, 0 /*verbose_level - 2*/);
1328 if (f_vv) {
1329 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1330 "semi-linear group element:" << endl;
1331 A_linear->element_print(Elt1, cout);
1332 }
1333 A_linear->element_move(Elt1, gens1->ith(pos), 0);
1334
1335
1336 pos++;
1337 }
1338 else {
1339 if (f_vv) {
1340 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1341 "generator " << g << " does not "
1342 "correspond to a semilinear mapping" << endl;
1343 }
1344 }
1345 }
1346 gens1->reallocate(pos, verbose_level - 2);
1347 if (f_vv) {
1348 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1349 "we found " << gens1->len << " generators" << endl;
1350 }
1351
1352 if (f_vvv) {
1353 gens1->print(cout);
1354 }
1355
1356
1357 if (f_vv) {
1358 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1359 "we are now testing the generators:" << endl;
1360 }
1361 int i, j1, j2;
1362
1363 for (g = 0; g < gens1->len; g++) {
1364 if (f_vv) {
1365 cout << "generator " << g << ":" << endl;
1366 }
1367 //A_linear->element_print(gens1->ith(g), cout);
1368 for (i = 0; i < P->N_points; i++) {
1369 j1 = A_linear->element_image_of(i, gens1->ith(g), 0);
1370 j2 = A_perm->element_image_of(i, gens->ith(g), 0);
1371 if (j1 != j2) {
1372 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1373 "problem with generator: "
1374 "j1 != j2" << endl;
1375 cout << "i=" << i << endl;
1376 cout << "j1=" << j1 << endl;
1377 cout << "j2=" << j2 << endl;
1378 cout << endl;
1379 exit(1);
1380 }
1381 }
1382 }
1383 if (f_vv) {
1384 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1385 "the generators are OK" << endl;
1386 }
1387
1388
1389
1390 groups::sims *S;
1392
1393 if (f_vv) {
1394 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1395 "before A_linear->create_sims_from_generators_with_target_group_order" << endl;
1396 }
1397
1399 gens1, *NO->Ago, 0 /*verbose_level*/);
1400
1401 if (f_vv) {
1402 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1403 "after A_linear->create_sims_from_generators_with_target_group_order" << endl;
1404 }
1405
1406
1407 S->group_order(go);
1408
1409
1410 if (f_vv) {
1411 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1412 "Found a group of order " << go << endl;
1413 }
1414 if (f_vvv) {
1415 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1416 "strong generators are:" << endl;
1417 S->print_generators();
1418 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1419 "strong generators are (in tex):" << endl;
1420 S->print_generators_tex(cout);
1421 }
1422
1423
1425
1426 if (D.compare_unsigned(*NO->Ago, go)) {
1427 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1428 "the group order does not match" << endl;
1429 cout << "ago = " << NO->Ago << endl;
1430 cout << "go = " << go << endl;
1431 exit(1);
1432 }
1433
1434#if 0
1435 if (f_v) {
1436 cout << "before freeing labeling" << endl;
1437 }
1438 FREE_int(labeling);
1439#endif
1440
1441#if 0
1442 if (f_v) {
1443 cout << "before freeing A_perm" << endl;
1444 }
1445 FREE_OBJECT(A_perm);
1446#endif
1447
1448 if (f_v) {
1449 cout << "not freeing gens" << endl;
1450 }
1451 //FREE_OBJECT(gens);
1452 if (f_v) {
1453 cout << "before freeing Mtx" << endl;
1454 }
1455 FREE_int(Mtx);
1456 FREE_int(Elt1);
1457
1458
1459 // ToDo what about gens1, should it be freed ?
1460
1461
1462 if (f_v) {
1463 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1464 "before initializing strong generators" << endl;
1465 }
1466
1468 SG->init_from_sims(S, 0 /* verbose_level*/);
1469 FREE_OBJECT(S);
1470
1471 if (f_v) {
1472 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group "
1473 "after initializing strong generators" << endl;
1474 }
1475
1476
1477 if (f_v) {
1478 cout << "nauty_interface_with_group::reverse_engineer_linear_group_from_permutation_group done" << endl;
1479 }
1480
1481}
1482
1483
1486 action *A_linear,
1487 int f_compute_canonical_form, data_structures::bitvector *&Canonical_form,
1489 int verbose_level)
1490{
1491 int f_v = (verbose_level >= 1);
1492
1493
1494
1495 if (f_v) {
1496 cout << "nauty_interface_with_group::set_stabilizer_of_object" << endl;
1497 cout << "verbose_level = " << verbose_level << endl;
1498 }
1499
1500
1501
1502
1503 if (f_v) {
1504 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1505 "before OiP->run_nauty" << endl;
1506
1507 }
1508
1509 OwCF->run_nauty(
1510 f_compute_canonical_form, Canonical_form,
1511 NO,
1512 verbose_level);
1513
1514 if (f_v) {
1515 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1516 "after OiP->run_nauty" << endl;
1517
1518 }
1519
1520 long int ago;
1521
1522
1523 ago = NO->Ago->as_lint();
1524
1525 if (f_v) {
1526 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1527 "after OiP->run_nauty" << endl;
1528
1529 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1530 "go = " << ago << endl;
1531
1532 NO->print_stats();
1533 }
1534
1535
1537 action *A_perm;
1538
1539 if (f_v) {
1540 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1541 "before Nauty.reverse_engineer_linear_group_from_permutation_group" << endl;
1542 }
1544 A_linear,
1545 OwCF->P,
1546 SG,
1547 A_perm,
1548 NO,
1549 verbose_level);
1550 if (f_v) {
1551 cout << "nauty_interface_with_group::set_stabilizer_of_object "
1552 "after Nauty.reverse_engineer_linear_group_from_permutation_group" << endl;
1553 }
1554
1555
1556 FREE_OBJECT(A_perm);
1557
1558 if (f_v) {
1559 cout << "nauty_interface_with_group::set_stabilizer_of_object done" << endl;
1560 }
1561 return SG;
1562}
1563
1564
1565
1566}}}
1567
compact storage of 0/1-data as bitvectors
void print_integer_matrix_width(std::ostream &ost, int *p, int m, int n, int dim_n, int w)
Definition: int_vec.cpp:852
void copy_to_lint(int *from, long int *to, long int len)
Definition: int_vec.cpp:177
void print(std::ostream &ost, std::vector< int > &v)
Definition: int_vec.cpp:413
void print(std::ostream &ost, long int *v, int len)
Definition: lint_vec.cpp:246
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
a combinatorial object for which a canonical form can be computed using Nauty
Definition: geometry.h:1487
void run_nauty(int f_compute_canonical_form, data_structures::bitvector *&Canonical_form, data_structures::nauty_output *&NO, int verbose_level)
projective space PG(n,q) of dimension n over Fq
Definition: geometry.h:1916
domain to compute with objects of type longinteger
Definition: ring_theory.h:240
int compare_unsigned(longinteger_object &a, longinteger_object &b)
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(void *elt, std::ostream &ost)
Definition: action_cb.cpp:347
int reverse_engineer_semilinear_map(geometry::projective_space *P, int *Elt, int *Mtx, int &frobenius, int verbose_level)
groups::strong_generators * Strong_gens
Definition: actions.h:130
void init_permutation_group_from_nauty_output(data_structures::nauty_output *NO, int verbose_level)
void make_element(int *Elt, int *data, int verbose_level)
Definition: action.cpp:1875
void element_move(void *a, void *b, int verbose_level)
Definition: action_cb.cpp:335
groups::sims * create_sims_from_generators_with_target_group_order(data_structures_groups::vector_ge *gens, ring_theory::longinteger_object &target_go, int verbose_level)
long int element_image_of(long int a, void *elt, int verbose_level)
Definition: action_cb.cpp:198
void automorphism_group_as_permutation_group(data_structures::nauty_output *NO, actions::action *&A_perm, int verbose_level)
groups::strong_generators * set_stabilizer_of_object(geometry::object_with_canonical_form *OwCF, action *A_linear, int f_compute_canonical_form, data_structures::bitvector *&Canonical_form, data_structures::nauty_output *&NO, int verbose_level)
action * create_automorphism_group_of_graph_with_partition_and_labeling(int n, int f_bitvector, data_structures::bitvector *Bitvec, int *Adj, int nb_parts, int *parts, int *labeling, int verbose_level)
void reverse_engineer_linear_group_from_permutation_group(actions::action *A_linear, geometry::projective_space *P, groups::strong_generators *&SG, actions::action *&A_perm, data_structures::nauty_output *NO, int verbose_level)
action * create_automorphism_group_and_canonical_labeling_of_graph(int *Adj, int n, int *labeling, int verbose_level)
action * create_automorphism_group_and_canonical_labeling_of_colored_graph(int n, int f_bitvec, data_structures::bitvector *Bitvec, int *Adj, int *vertex_colors, int *labeling, int verbose_level)
action * create_automorphism_group_and_canonical_labeling_of_colored_graph_object(graph_theory::colored_graph *CG, int *labeling, int verbose_level)
action * create_automorphism_group_of_graph(int *Adj, int n, int verbose_level)
action * create_automorphism_group_of_graph_bitvec(int n, data_structures::bitvector *Bitvec, int verbose_level)
action * create_automorphism_group_of_colored_graph_object(graph_theory::colored_graph *CG, int verbose_level)
void reallocate(int new_length, int verbose_level)
Definition: vector_ge.cpp:444
void init(actions::action *A, int verbose_level)
Definition: vector_ge.cpp:55
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void group_order(ring_theory::longinteger_object &go)
Definition: sims.cpp:951
void print_generators_tex(std::ostream &ost)
Definition: sims_io.cpp:231
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)
data_structures_groups::vector_ge * gens
Definition: groups.h:1708
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define ODD(x)
Definition: foundations.h:222
#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