Orbiter 2022
Combinatorial Objects
quartic_curve_object.cpp
Go to the documentation of this file.
1/*
2 * quartic_curve_object.cpp
3 *
4 * Created on: May 20, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16
17
18namespace orbiter {
19namespace layer1_foundations {
20namespace algebraic_geometry {
21
22
23
25{
26 q = 0;
27 F = NULL;
28 Dom = NULL;
29
30
31 Pts = NULL;
32 nb_pts = 0;
33
34 //Lines = NULL;
35 //nb_lines = 0;
36
37 //eqn15[15]
38
40 //bitangents28[28]
41
42 QP = NULL;
43
44 //null();
45}
46
48{
49 freeself();
50}
51
53{
54 int verbose_level = 0;
55 int f_v = (verbose_level >= 1);
56
57 if (f_v) {
58 cout << "quartic_curve_object::freeself" << endl;
59 }
60 if (Pts) {
62 }
63#if 0
64 if (Lines) {
65 FREE_lint(Lines);
66 }
67#endif
68 if (QP) {
70 }
71
72
73
74 if (f_v) {
75 cout << "quartic_curve_object::freeself done" << endl;
76 }
77}
78
80{
81}
82
84 int *eqn15,
85 int verbose_level)
86{
87 int f_v = (verbose_level >= 1);
88
89 if (f_v) {
90 cout << "quartic_curve_object::init_equation_but_no_bitangents" << endl;
91 Int_vec_print(cout, eqn15, 15);
92 cout << endl;
93 }
94
96 F = Dom->P->F;
97 q = F->q;
98
101
102
103
104 if (f_v) {
105 cout << "quartic_curve_object::init_equation_but_no_bitangents "
106 "before enumerate_points" << endl;
107 }
108 enumerate_points(verbose_level - 1);
109 if (f_v) {
110 cout << "quartic_curve_object::init_equation_but_no_bitangents "
111 "after enumerate_points" << endl;
112 }
113
114 if (f_v) {
115 cout << "quartic_curve_object::init_equation_but_no_bitangents "
116 "before compute_properties" << endl;
117 }
118 compute_properties(verbose_level - 2);
119 if (f_v) {
120 cout << "quartic_curve_object::init_equation_but_no_bitangents "
121 "after compute_properties" << endl;
122 }
123
124
125 if (f_v) {
126 cout << "quartic_curve_object::init_equation_but_no_bitangents done" << endl;
127 }
128}
129
131 int *eqn15, long int *bitangents28,
132 int verbose_level)
133{
134 int f_v = (verbose_level >= 1);
135
136 if (f_v) {
137 cout << "quartic_curve_object::init_equation_and_bitangents" << endl;
138 cout << "eqn15:";
139 Int_vec_print(cout, eqn15, 15);
140 cout << endl;
141 cout << "bitangents28:";
142 Lint_vec_print(cout, bitangents28, 28);
143 cout << endl;
144 }
145
147 F = Dom->P->F;
148 q = F->q;
149
153
154
155
156 if (f_v) {
157 cout << "quartic_curve_object::init_equation_and_bitangents "
158 "before enumerate_points" << endl;
159 }
160 enumerate_points(0/*verbose_level - 1*/);
161 if (f_v) {
162 cout << "quartic_curve_object::init_equation_and_bitangents "
163 "after enumerate_points" << endl;
164 }
165
166 if (f_v) {
167 cout << "quartic_curve_object::init_equation_and_bitangents done" << endl;
168 }
169}
170
171
174 int *eqn15, long int *bitangents28,
175 int verbose_level)
176{
177 int f_v = (verbose_level >= 1);
178
179 if (f_v) {
180 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties" << endl;
181 }
182
183 if (f_v) {
184 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties "
185 "before init_equation_and_bitangents" << endl;
186 }
188 if (f_v) {
189 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties "
190 "after init_equation_and_bitangents" << endl;
191 }
192
193
194 if (f_v) {
195 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties "
196 "before compute_properties" << endl;
197 }
198 compute_properties(verbose_level - 2);
199 if (f_v) {
200 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties "
201 "after compute_properties" << endl;
202 }
203
204
205 if (f_v) {
206 cout << "quartic_curve_object::init_equation_and_bitangents_and_compute_properties done" << endl;
207 }
208}
209
210
211
213{
214 int f_v = (verbose_level >= 1);
215
216 if (f_v) {
217 cout << "quartic_curve_object::enumerate_points" << endl;
218 }
219
220 if (f_v) {
221 cout << "quartic_curve_object::enumerate_points before "
222 "Dom->Poly4_3->enumerate_points" << endl;
223 }
224 Dom->Poly4_3->enumerate_points_lint(eqn15, Pts, nb_pts, 0/*verbose_level - 1*/);
225
226 if (f_v) {
227 cout << "quartic_curve_object::enumerate_points after "
228 "Dom->Poly4_3->enumerate_points" << endl;
229 }
230 if (f_v) {
231 cout << "quartic_curve_object::enumerate_points The curve "
232 "has " << nb_pts << " points" << endl;
233 }
234
235
236 if (f_v) {
237 cout << "quartic_curve_object::enumerate_points done" << endl;
238 }
239}
240
241
242
244{
245 int f_v = (verbose_level >= 1);
246
247 if (f_v) {
248 cout << "quartic_curve_object::compute_properties" << endl;
249 }
250
252
253 QP->init(this, verbose_level);
254
255 if (f_v) {
256 cout << "quartic_curve_object::compute_properties done" << endl;
257 }
258}
259
261{
262 int f_v = (verbose_level >= 1);
263
264 if (f_v) {
265 cout << "quartic_curve_object::recompute_properties" << endl;
266 }
267
268
269 if (QP) {
271 QP = NULL;
272 }
273
275
276 QP->init(this, verbose_level);
277
278
279 if (f_v) {
280 cout << "quartic_curve_object::recompute_properties done" << endl;
281 }
282}
283
284
285
286
287
288
289
290
291
292
293void quartic_curve_object::identify_lines(long int *lines, int nb_lines,
294 int *line_idx, int verbose_level)
295{
296 int f_v = (verbose_level >= 1);
297 int i, idx;
299
300 if (f_v) {
301 cout << "quartic_curve_object::identify_lines" << endl;
302 }
303 for (i = 0; i < nb_lines; i++) {
304 if (!Sorting.lint_vec_search_linear(bitangents28, 28, lines[i], idx)) {
305 cout << "quartic_curve_object::identify_lines could "
306 "not find lines[" << i << "]=" << lines[i]
307 << " in bitangents28[]" << endl;
308 exit(1);
309 }
310 line_idx[i] = idx;
311 }
312 if (f_v) {
313 cout << "quartic_curve_object::identify_lines done" << endl;
314 }
315}
316
317
318
319int quartic_curve_object::find_point(long int P, int &idx)
320{
322
323 if (Sorting.lint_vec_search(Pts, nb_pts, P,
324 idx, 0 /* verbose_level */)) {
325 return TRUE;
326 }
327 else {
328 return FALSE;
329 }
330}
331
332
333
334
335}}}
336
domain for quartic curves in PG(2,q) with 28 bitangents
properties of a particular quartic curve surface in PG(2,q), as defined by an object of class quartic...
void init_equation_and_bitangents_and_compute_properties(quartic_curve_domain *Dom, int *eqn15, long int *bitangents28, int verbose_level)
void init_equation_and_bitangents(quartic_curve_domain *Dom, int *eqn15, long int *bitangents28, int verbose_level)
void identify_lines(long int *lines, int nb_lines, int *line_idx, int verbose_level)
void init_equation_but_no_bitangents(quartic_curve_domain *Dom, int *eqn15, int verbose_level)
a collection of functions related to sorted vectors
int lint_vec_search_linear(long int *v, int len, long int a, int &idx)
Definition: sorting.cpp:699
int lint_vec_search(long int *v, int len, long int a, int &idx, int verbose_level)
Definition: sorting.cpp:1157
void enumerate_points_lint(int *coeff, long int *&Pts, int &nb_pts, int verbose_level)
#define Lint_vec_copy(A, B, C)
Definition: foundations.h:694
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define Lint_vec_print(A, B, C)
Definition: foundations.h:686
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_copy(A, B, C)
Definition: foundations.h:693
#define FREE_lint(p)
Definition: foundations.h:642
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects