Orbiter 2022
Combinatorial Objects
subgroup.cpp
Go to the documentation of this file.
1// subgroup.cpp
2//
3// Anton Betten
4// April 29, 2017
5
7#include "group_actions.h"
8
9using namespace std;
10
11
12namespace orbiter {
13namespace layer3_group_actions {
14namespace groups {
15
16
17
19{
20 A = NULL;
21 Elements = NULL;
22 group_order = 0;
23 gens = NULL;
24 nb_gens = 0;
25 Sub = NULL;
26 SG = NULL;
27 //null();
28}
29
31{
32 freeself();
33}
34
36{
37 A = NULL;
38 Elements = NULL;
39 group_order = 0;
40 gens = NULL;
41 nb_gens = 0;
42 Sub = NULL;
43 SG = NULL;
44}
45
47{
48 if (Elements) {
50 }
51 if (gens) {
53 }
54 if (Sub) {
56 }
57 if (SG) {
59 }
60 null();
61}
62
64 strong_generators *SG, int verbose_level)
65{
66 int f_v = (verbose_level >= 1);
67 int *Elt;
68 long int i, rk;
70
71 if (f_v) {
72 cout << "subgroup::init_from_sims" << endl;
73 }
74 A = S->A;
78 if (f_v) {
79 cout << "subgroup::init_from_sims "
80 "group_order=" << group_order << endl;
81 }
84 for (i = 0; i < group_order; i++) {
85 Sub->element_unrank_lint(i, Elt);
86 rk = S->element_rank_lint(Elt);
87 Elements[i] = rk;
88 }
90
91 if (f_v) {
92 cout << "subgroup::init_from_sims done" << endl;
93 }
94}
95
96void subgroup::init(int *Elements,
97 int group_order, int *gens, int nb_gens)
98{
105}
106
108{
109 cout << "group of order " << group_order << " : ";
111 cout << " gens: ";
112 Int_vec_print(cout, gens, nb_gens);
113 cout << endl;
114}
115
117{
118 int idx;
120
121 if (Sorting.int_vec_search(Elements, group_order, elt, idx)) {
122 return TRUE;
123 }
124 else {
125 return FALSE;
126 }
127}
128
129void subgroup::report(ostream &ost)
130{
132}
133
134}}}
135
136
a collection of functions related to sorted vectors
int int_vec_search(int *v, int len, int a, int &idx)
Definition: sorting.cpp:1094
a permutation group represented via a stabilizer chain
Definition: groups.h:1273
void element_unrank_lint(long int rk, int *Elt, int verbose_level)
Definition: sims.cpp:1326
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void init_from_sims(sims *S, sims *Sub, strong_generators *SG, int verbose_level)
Definition: subgroup.cpp:63
void init(int *Elements, int group_order, int *gens, int nb_gens)
Definition: subgroup.cpp:96
#define FREE_int(p)
Definition: foundations.h:640
#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 Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects