Orbiter 2022
Combinatorial Objects
packing_was_fixpoints_activity.cpp
Go to the documentation of this file.
1/*
2 * packing_was_fixpoints_activity.cpp
3 *
4 * Created on: Apr 3, 2021
5 * Author: betten
6 */
7
8
9
10#include "orbiter.h"
11
12using namespace std;
13
14namespace orbiter {
15namespace layer5_applications {
16namespace packings {
17
18
20{
21 Descr = NULL;
22 PWF = NULL;
23
24}
25
27{
28
29}
30
31
32
35 int verbose_level)
36{
37 int f_v = (verbose_level >= 1);
38
39 if (f_v) {
40 cout << "packing_was_fixpoints_activity::init" << endl;
41 }
42
45
46 if (f_v) {
47 cout << "packing_was_fixpoints_activity::init done" << endl;
48 }
49}
50
52{
53 int f_v = (verbose_level >= 1);
54
55 if (Descr->f_report) {
56
57
58 if (f_v) {
59 cout << "packing_was_fixpoints_activity::perform_activity before PW->report" << endl;
60 }
61
62 PWF->report(verbose_level);
63
64 if (f_v) {
65 cout << "packing_was_fixpoints_activity::perform_activity after PW->report" << endl;
66 }
67
68
69 }
70 else if (Descr->f_print_packing) {
71
72
73 if (f_v) {
74 cout << "packing_was_fixpoints_activity::perform_activity f_print_packing" << endl;
75 }
76
77 long int *packing;
78 int sz;
79
81
82 PWF->print_packing(packing, sz, verbose_level);
83
84
85
86
87 if (f_v) {
88 cout << "packing_was_fixpoints_activity::perform_activity f_print_packing" << endl;
89 }
90
91
92 }
94
95
96 if (f_v) {
97 cout << "packing_was_fixpoints_activity::perform_activity f_print_packing" << endl;
98 }
99
101 int *M1;
102 int *M2;
103 int m1, n1;
104 int m2, n2;
105 int len1, len2;
106
108 m1, n1, verbose_level);
109
111 m2, n2, verbose_level);
112
113
114 len1 = m1 * n1;
115 len2 = m2 * n2;
116
118
119 Sorting.int_vec_sort_and_remove_duplicates(M1, len1);
120 Sorting.int_vec_sort_and_remove_duplicates(M2, len2);
121
122
123 int *v3;
124 int len3;
125
126 v3 = NEW_int(len1 + len2);
127 Sorting.int_vec_intersect_sorted_vectors(M1, len1,
128 M2, len2, v3, len3);
129
130
131 cout << "The intersection has size " << len3 << ":" << endl;
132 Int_vec_print(cout, v3, len3);
133 cout << endl;
134
135
136
137
138 if (f_v) {
139 cout << "packing_was_fixpoints_activity::perform_activity f_print_packing" << endl;
140 }
141
142
143 }
144
145
146
147
148
149 if (f_v) {
150 cout << "packing_was_fixpoints_activity::perform_activity" << endl;
151 }
152
153}
154
155}}}
156
157
158
a collection of functions related to sorted vectors
void int_vec_intersect_sorted_vectors(int *v1, int len1, int *v2, int len2, int *v3, int &len3)
Definition: sorting.cpp:771
void int_matrix_read_csv(std::string &fname, int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1477
description of an activity after the fixed points have been selected in the construction of packings ...
Definition: packings.h:445
void init(packing_was_fixpoints_activity_description *Descr, packing_was_fixpoints *PWF, int verbose_level)
packing_was_fixpoints_activity_description * Descr
Definition: packings.h:474
picking fixed points in the construction of packings in PG(3,q) with assumed symmetry
Definition: packings.h:494
void print_packing(long int *packing, int sz, int verbose_level)
#define Lint_vec_scan(A, B, C)
Definition: foundations.h:717
#define NEW_int(n)
Definition: foundations.h:625
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects