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

◆ to_vector()

vec res2_poly::to_vector ( const res2term * f,
const FreeModule * F,
int to_minimal = 0 ) const

Definition at line 275 of file res-a0-poly.cpp.

278{
279 vecHeap H(F);
280 monomial mon = M->make_one();
281 for (const res2term *tm = f; tm != nullptr; tm = tm->next)
282 {
283 // int x = (to_minimal ? tm->comp->minimal_me : tm->comp->me);
284 int x = tm->comp->me; // MES: Currently used for non-minimal as well...
285 M->divide(tm->monom, tm->comp->syz->monom, mon);
286
287 ring_elem a = R->make_flat_term(tm->coeff, mon);
288 vec tmp = R->make_vec(x, a);
289 H.add(tmp);
290 }
291 M->remove(mon);
292 return H.value();
293}
const Monoid * M
const PolynomialRing * R
#define monomial
Definition gb-toric.cpp:11
volatile int x

References vecHeap::add(), M, monomial, res2term::next, R, vecHeap::value(), and x.