49{
52
53 std::vector<int> weights;
54 if (R2 == nullptr)
55 {
56
58 {
59 return new HermiteComputation(m, collect_syz, n_rows_to_keep);
60 }
62 {
63 return new GaussElimComputation(m, collect_syz, n_rows_to_keep);
64 }
65#ifdef DEVELOPMENT
66#warning "handle non polynomial rings"
67#endif
68 ERROR(
"GB computation for non-polynomial rings not yet re-implemented");
69 return nullptr;
70 }
71
72
73
74
75
76#ifdef DEVELOPMENT
77#warning "NOT QUITE!! Need to know if it is ZZ or QQ"
78#warning "unused variables commented out"
79#endif
80
81
83
84 switch (algorithm)
85 {
86 case 4:
88 collect_syz,
89 n_rows_to_keep,
90 gb_weights,
91 strategy,
92 use_max_degree,
93 max_degree);
94 break;
95 case 5:
97 collect_syz,
98 n_rows_to_keep,
99 gb_weights,
100 strategy,
101 use_max_degree,
102 max_degree);
103 break;
104 case 6:
106 collect_syz,
107 n_rows_to_keep,
108 gb_weights,
109 strategy,
110 use_max_degree,
111 max_degree,
112 numThreads);
113 break;
114 case 7:
116 collect_syz,
117 n_rows_to_keep,
118 gb_weights,
119 strategy,
120 use_max_degree,
121 max_degree);
122 break;
123 case 8:
124 ERROR(
"Algorithm => Test has been removed from M2");
125 return nullptr;
126 case 9:
127
130 weights,
131 strategy,
132 numThreads);
133 break;
134 default:
136 collect_syz,
137 n_rows_to_keep,
138 gb_weights,
139 strategy,
140 use_max_degree,
141 max_degree,
142 max_reduction_count);
143 break;
144 }
147
148#if 0
149
150
151
152
153
154
155
156
157
158#endif
159#if 0
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205#endif
206}
static GB_comp * create(const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree)
static GBinhom_comp * create(const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree)
const Ring * get_ring() const
virtual const PolynomialRing * cast_to_PolynomialRing() const
static binomialGB_comp * create(const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree)
static gbA * create(const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree, int max_reduction_count)
GBComputation * createGBF4Interface(const Matrix *m, const std::vector< int > &weights, int strategy, int numThreads)
GBComputation * createF4GB(const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree, int numThreads)
void intern_GB(GBComputation *G)
VALGRIND_MAKE_MEM_DEFINED & result(result)
std::vector< T > M2_arrayint_to_stdvector(M2_arrayint arr)