Orbiter 2022
Combinatorial Objects
canonical_form_nauty.cpp
Go to the documentation of this file.
1/*
2 * canonical_form_nauty.cpp
3 *
4 * Created on: Apr 17, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace projective_geometry {
18
19
20
22{
23 idx = 0;
24 eqn = NULL;
25 sz = 0;
26
27 Pts_on_curve = NULL;
28 sz_curve = 0;
29
30 bitangents = NULL;
31 nb_bitangents = 0;
32
33 nb_rows = 0;
34 nb_cols = 0;
35 Canonical_form = NULL;
36 canonical_labeling = NULL;
38
39
40 SG_pt_stab = NULL;
41
42 Orb = NULL;
43
44 Stab_gens_quartic = NULL;
45}
46
48{
49}
50
55 int idx, int *eqn, int sz,
56 long int *Pts_on_curve, int sz_curve,
57 long int *bitangents, int nb_bitangents,
58 int *canonical_equation,
59 int *transporter_to_canonical_form,
60 groups::strong_generators *&gens_stab_of_canonical_equation,
61 int verbose_level)
62{
63 int f_v = (verbose_level >= 1);
64
65
66 if (f_v) {
67 cout << "canonical_form_nauty::quartic_curve" << endl;
68 }
69
77
78 if (f_v) {
79 cout << "equation is:";
80 Poly4_x123->print_equation_simple(cout, eqn);
81 cout << endl;
82 }
83
86
87 int f_compute_canonical_form = TRUE;
88
89
91
92 if (f_v) {
93 cout << "canonical_form_nauty::quartic_curve before OwCF->init_point_set" << endl;
94 }
95 OwCF->init_point_set(
97 verbose_level - 1);
98 if (f_v) {
99 cout << "canonical_form_nauty::quartic_curve after OwCF->init_point_set" << endl;
100 }
101 OwCF->P = PA->P;
102
103 int nb_rows, nb_cols;
104
105 OwCF->encoding_size(
107 verbose_level);
108 if (f_v) {
109 cout << "canonical_form_nauty::quartic_curve nb_rows = " << nb_rows << endl;
110 cout << "canonical_form_nauty::quartic_curve nb_cols = " << nb_cols << endl;
111 }
112
113
116
118 NO->allocate(nb_rows + nb_cols, verbose_level);
119
120
121 if (f_v) {
122 cout << "canonical_form_nauty::quartic_curve before Nau.set_stabilizer_of_object" << endl;
123 }
125 OwCF,
126 PA->A,
127 f_compute_canonical_form, Canonical_form,
128 NO,
129 0 /*verbose_level*/);
130 if (f_v) {
131 cout << "canonical_form_nauty::quartic_curve after Nau.set_stabilizer_of_object" << endl;
132 }
133
134
135 if (f_v) {
136 cout << "canonical_form_nauty::quartic_curve "
137 "go = " << *NO->Ago << endl;
138
139 NO->print_stats();
140
141
142
143 }
144
145 FREE_OBJECT(NO);
146
147 SG_pt_stab->group_order(pt_stab_order);
148 if (f_v) {
149 cout << "canonical_form_nauty::quartic_curve "
150 "pt_stab_order = " << pt_stab_order << endl;
151 }
152
153 FREE_OBJECT(OwCF);
154
155
156
157
158
159 // compute the orbit of the equation under the stabilizer of the set of points:
160
161
162 //orbit_of_equations *Orb;
163
165
166
167#if 1
168 if (f_v) {
169 cout << "canonical_form_nauty::quartic_curve "
170 "before Orb->init" << endl;
171 }
172 Orb->init(PA->A, PA->F,
173 AonHPD,
174 SG_pt_stab /* A->Strong_gens*/, eqn,
175 verbose_level);
176 if (f_v) {
177 cout << "canonical_form_nauty::quartic_curve "
178 "after Orb->init" << endl;
179 cout << "canonical_form_nauty::quartic_curve "
180 "found an orbit of length " << Orb->used_length << endl;
181 }
182
183
184 // ToDo: we need to compute the canonical form!
185
186 if (f_v) {
187 cout << "canonical_form_nauty::quartic_curve "
188 "before Orb->get_canonical_form" << endl;
189 }
191 canonical_equation,
192 transporter_to_canonical_form,
193 gens_stab_of_canonical_equation,
194 pt_stab_order,
195 verbose_level);
196 if (f_v) {
197 cout << "canonical_form_nauty::quartic_curve "
198 "after Orb->get_canonical_form" << endl;
199 }
200
201 if (f_v) {
202 cout << "canonical_form_nauty::quartic_curve "
203 "before Orb->stabilizer_orbit_rep" << endl;
204 }
206 pt_stab_order, verbose_level);
207 if (f_v) {
208 cout << "canonical_form_nauty::quartic_curve "
209 "after Orb->stabilizer_orbit_rep" << endl;
210 }
211 if (f_v) {
213
215 cout << "The stabilizer is a group of order " << go << endl;
217 }
218#endif
219
220 //FREE_OBJECT(SG_pt_stab);
221 //FREE_OBJECT(Orb);
222
223
224 if (f_v) {
225 cout << "canonical_form_nauty::quartic_curve done" << endl;
226 }
227}
228
229
230
231
232}}}
233
234
a combinatorial object for which a canonical form can be computed using Nauty
Definition: geometry.h:1487
void encoding_size(int &nb_rows, int &nb_cols, int verbose_level)
homogeneous polynomials of a given degree in a given number of variables over a finite field GF(q)
Definition: ring_theory.h:88
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
Interface to the graph canonization software Nauty.
Definition: actions.h:1154
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)
a strong generating set for a permutation group with respect to a fixed action
Definition: groups.h:1703
void group_order(ring_theory::longinteger_object &go)
induced action on the set of homogeneous polynomials over a finite field
orbit of homogeneous equations using a Schreier tree
Definition: orbits.h:30
groups::strong_generators * stabilizer_orbit_rep(ring_theory::longinteger_object &full_group_order, int verbose_level)
void get_canonical_form(int *canonical_equation, int *transporter_to_canonical_form, groups::strong_generators *&gens_stab_of_canonical_equation, ring_theory::longinteger_object &full_group_order, int verbose_level)
void init(actions::action *A, field_theory::finite_field *F, induced_actions::action_on_homogeneous_polynomials *AonHPD, groups::strong_generators *SG, int *coeff_in, int verbose_level)
void quartic_curve(projective_space_with_action *PA, ring_theory::homogeneous_polynomial_domain *Poly4_x123, induced_actions::action_on_homogeneous_polynomials *AonHPD, int idx, int *eqn, int sz, long int *Pts_on_curve, int sz_curve, long int *bitangents, int nb_bitangents, int *canonical_equation, int *transporter_to_canonical_form, groups::strong_generators *&gens_stab_of_canonical_equation, int verbose_level)
projective space PG(n,q) with automorphism group PGGL(n+1,q)
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define TRUE
Definition: foundations.h:231
the orbiter library for the classification of combinatorial objects