Orbiter 2022
Combinatorial Objects
action_on_sign.cpp
Go to the documentation of this file.
1// action_on_sign.cpp
2//
3// Anton Betten
4// August 12, 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 perm = NULL;
30}
31
33{
34 if (perm) {
36 }
37 null();
38}
39
40
41void action_on_sign::init(actions::action *A, int verbose_level)
42{
43 int f_v = (verbose_level >= 1);
45
46 if (f_v) {
47 cout << "action_on_sign::init" << endl;
48 }
51 if (f_v) {
52 cout << "perm_degree=" << perm_degree << endl;
53 }
55 degree = 2;
56
57 if (f_v) {
58 cout << "action_on_sign::init" << endl;
59 }
60}
61
63 long int i, int verbose_level)
64{
65 int f_v = (verbose_level >= 1);
66 long int u, v, sgn, j;
68
69 if (f_v) {
70 cout << "action_on_sign::compute_image "
71 "i = " << i << endl;
72 }
73 if (i < 0 || i >= degree) {
74 cout << "action_on_sign::compute_image "
75 "i = " << i << " out of range" << endl;
76 exit(1);
77 }
78 for (u = 0; u < perm_degree; u++) {
79 v = A->element_image_of(u, Elt, FALSE);
80 perm[u] = v;
81 }
82 sgn = Combi.perm_signum(perm, perm_degree);
83 if (sgn == -1) {
84 j = (i + 1) % 2;
85 }
86 else {
87 j = i;
88 }
89
90 if (f_v) {
91 cout << "action_on_sign::compute_image "
92 "image of " << i << " is " << j << endl;
93 }
94 return j;
95}
96
97}}}
98
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
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
long int compute_image(int *Elt, long int i, int verbose_level)
void init(actions::action *A, int verbose_level)
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_int(n)
Definition: foundations.h:625
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects