Orbiter 2022
Combinatorial Objects
action_on_orbits.cpp
Go to the documentation of this file.
1// action_on_orbits.cpp
2//
3// Anton Betten
4// Apr 29, 2016
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12namespace orbiter {
13namespace layer3_group_actions {
14namespace induced_actions {
15
16
18{
19 null();
20}
21
23{
24 free();
25}
26
28{
29 A = NULL;
30 Sch = NULL;
32}
33
35{
36 null();
37}
38
40 groups::schreier *Sch, int f_play_it_safe, int verbose_level)
41{
42 int f_v = (verbose_level >= 1);
43
44 if (f_v) {
45 cout << "action_on_orbits::init" << endl;
46 }
51 if (f_v) {
52 cout << "action_on_orbits::init done" << endl;
53 }
54}
55
57 long int i, int verbose_level)
58{
59 int f_v = (verbose_level >= 1);
60 int j, j1, f, l, a, b, h;
61
62 if (f_v) {
63 cout << "action_on_orbits::compute_image "
64 "i = " << i << endl;
65 }
66 if (i < 0 || i >= degree) {
67 cout << "action_on_orbits::compute_image "
68 "i = " << i << " out of range" << endl;
69 exit(1);
70 }
71 f = Sch->orbit_first[i];
72 l = Sch->orbit_len[i];
73 a = Sch->orbit[f];
74 b = A->element_image_of(a, Elt, 0 /* verbose_level */);
75 if (f_v) {
76 cout << "action_on_orbits::compute_image "
77 "image of " << a << " is " << b << endl;
78 }
79 j = Sch->orbit_number(b); //Sch->orbit_no[Sch->orbit_inv[b]];
80 if (f_play_it_safe) {
81 for (h = 1; h < l; h++) {
82 a = Sch->orbit[f + h];
83 b = A->element_image_of(a, Elt, 0 /* verbose_level */);
84 j1 = Sch->orbit_number(b); //Sch->orbit_no[Sch->orbit_inv[b]];
85 if (j1 != j) {
86 cout << "action_on_orbits::compute_image "
87 "playing it safe, there is a problem" << endl;
88 cout << "action_on_orbits::compute_image i = " << i << endl;
89 cout << "action_on_orbits::compute_image j = " << j << endl;
90 cout << "action_on_orbits::compute_image j1 = " << j1 << endl;
91 cout << "action_on_orbits::compute_image h = " << h << endl;
92 cout << "action_on_orbits::compute_image l = " << l << endl;
93 exit(1);
94 }
95 }
96 }
97 return j;
98}
99
100}}}
101
102
a permutation group in a fixed action.
Definition: actions.h:99
long int element_image_of(long int a, void *elt, int verbose_level)
Definition: action_cb.cpp:198
Schreier trees for orbits of groups on points.
Definition: groups.h:839
void init(actions::action *A, groups::schreier *Sch, int f_play_it_safe, int verbose_level)
long int compute_image(int *Elt, long int i, int verbose_level)
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects