Macaulay2 Engine
Loading...
Searching...
No Matches

◆ new_gen()

s_pair * GBinhom_comp::new_gen ( int i,
gbvector * f,
ring_elem denom )
private

Definition at line 201 of file gb-sugarless.cpp.

202{
203 gbvector *fsyz;
204
205 if (i < n_comps_per_syz)
206 fsyz = GR->gbvector_term(Fsyz, denom, i + 1);
207 else
208 fsyz = GR->gbvector_zero();
209
210 if (GR->gbvector_is_zero(f))
211 {
212 if (!GR->gbvector_is_zero(fsyz))
213 {
214 vec fsyzvec = originalR->translate_gbvector_to_vec(Fsyz, fsyz);
215 n_syz++;
216 syz.append(fsyzvec);
217 }
218 return nullptr;
219 }
220
221 s_pair *result = new s_pair;
222 result->next = nullptr;
223 result->syz_type = SPAIR_GEN;
224 result->degree = weightInfo_->gbvector_weight(f);
225 result->compare_num = 0;
226 result->first = nullptr;
227 result->second = nullptr;
228 result->f = f; /* NOTE THAT WE GRAB f */
229 result->fsyz = fsyz;
230
231 result->lcm = M->make_new(result->f->monom);
232
233 return result;
234}
const FreeModule * Fsyz
MatrixConstructor syz
GBWeight * weightInfo_
const Monoid * M
const PolynomialRing * originalR
const int SPAIR_GEN
Definition comp-gb.hpp:55
VALGRIND_MAKE_MEM_DEFINED & result(result)

References Fsyz, GR, M, n_comps_per_syz, n_syz, originalR, result(), SPAIR_GEN, syz, and weightInfo_.

Referenced by add_gens().