Implements GBRing.
Definition at line 154 of file gbring.cpp.
160{
161 gbvector head;
162 gbvector *inresult = &head;
163
166
167 M->to_expvector(m, EXP1);
168
169 for (
const gbvector *
s = f;
s !=
nullptr;
s =
s->next)
170 {
172 int sign =
_skew.mult_sign(EXP1, EXP2);
173 if (sign == 0) continue;
174
177 t->
comp =
s->comp + comp;
178 t->
coeff =
K->mult(c,
s->coeff);
179 if (sign < 0)
K->negate_to(t->
coeff);
180
181 M->mult(m,
s->monom, t->
monom);
183 inresult = inresult->
next;
184 }
185 inresult->
next =
nullptr;
187}
exponents::Exponents exponents_t
gbvector * new_raw_term()
void gbvector_get_lead_exponents(const FreeModule *F, const gbvector *f, int *result)
#define ALLOCATE_EXPONENTS(byte_len)
References GBRing::_skew, ALLOCATE_EXPONENTS, gbvector::coeff, gbvector::comp, GBRing::exp_size, GBRing::gbvector_get_lead_exponents(), GBRing::K, GBRing::M, gbvector::monom, GBRing::new_raw_term(), gbvector::next, and s.