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

◆ new_gen()

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

Definition at line 186 of file gb-homog2.cpp.

187{
188 gbvector *fsyz;
189
190 if (i < _n_rows_per_syz)
191 fsyz = _GR->gbvector_term(_Fsyz, denom, i + 1);
192 else
193 fsyz = _GR->gbvector_zero();
194
195 if (_GR->gbvector_is_zero(f))
196 {
197 if (!_GR->gbvector_is_zero(fsyz))
198 {
199 _syz.push_back(fsyz);
200 _n_syz++;
201 }
202 return nullptr;
203 }
204
205 s_pair *result = new s_pair;
206 result->next = nullptr;
207 result->syz_type = SPAIR_GEN;
208 result->degree = weightInfo_->gbvector_weight(f);
209 result->compare_num = 0;
210 result->first = nullptr;
211 result->second = nullptr;
212 result->f = f; /* NOTE THAT WE GRAB f */
213 result->fsyz = fsyz;
214
215 result->lcm = _M->make_new(result->f->monom);
216
217 return result;
218}
int _n_syz
Definition gb-homog2.hpp:96
const FreeModule * _Fsyz
Definition gb-homog2.hpp:74
const Monoid * _M
Definition gb-homog2.hpp:70
const GBWeight * weightInfo_
Definition gb-homog2.hpp:69
int _n_rows_per_syz
GBRing * _GR
Definition gb-homog2.hpp:68
const int SPAIR_GEN
Definition comp-gb.hpp:55
VALGRIND_MAKE_MEM_DEFINED & result(result)

References _Fsyz, _GR, _M, _n_rows_per_syz, _n_syz, result(), SPAIR_GEN, and weightInfo_.

Referenced by initialize().