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

◆ gbvector_apply()

void GBRing::gbvector_apply ( const FreeModule * F,
const FreeModule * Fsyz,
gbvector *& f,
gbvector *& fsyz,
const gbvector * gsyz,
const gbvector ** elems,
const gbvector ** elems_syz,
const gbvector ** quotients )

Definition at line 1251 of file gbring.cpp.

1259{
1260 // modifies (f,fsyz)
1261 // gsyz is allowed to have negative elements. These refer to
1262 // quotient ring elements. In this case, the component that
1263 // is used is the lead component of f. (i.e. this is designed for
1264 // cancelling lead terms).
1265 // [combines: freemod::apply_quotient_ring_elements,
1266 // GBZZ_comp::apply_gb_elements]
1267
1268 for (; gsyz != nullptr; gsyz = gsyz->next)
1269 {
1270 if (gsyz->comp < 0)
1271 {
1272 gbvector *v = mult_by_term(
1273 F, quotients[-1 - gsyz->comp], gsyz->coeff, gsyz->monom, f->comp);
1274 gbvector_add_to(F, f, v);
1275 }
1276 else
1277 {
1278 gbvector *v =
1279 mult_by_term(F, elems[gsyz->comp], gsyz->coeff, gsyz->monom, 0);
1280 gbvector_add_to(F, f, v);
1281 gbvector *vsyz = mult_by_term(
1282 Fsyz, elems_syz[gsyz->comp], gsyz->coeff, gsyz->monom, 0);
1283 gbvector_add_to(Fsyz, fsyz, vsyz);
1284 }
1285 }
1286}
gbvector * mult_by_term(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
Definition gbring.cpp:839
void gbvector_add_to(const FreeModule *F, gbvector *&f, gbvector *&g)
Definition gbring.cpp:668
ring_elem coeff
Definition gbring.hpp:81
gbvector * next
Definition gbring.hpp:80
int monom[1]
Definition gbring.hpp:83
int comp
Definition gbring.hpp:82

References gbvector::coeff, gbvector::comp, gbvector_add_to(), gbvector::monom, mult_by_term(), and gbvector::next.