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

◆ receive_generator()

bool gb2_comp::receive_generator ( gbvector * f,
int n,
const ring_elem denom )
virtual

Implements gb_node.

Definition at line 614 of file res-a2-gb.cpp.

615{
616 bool isgen = false;
617 // It is our duty to free 'f'...
618
619 for (int i = monideals.size(); i <= F->rank(); i++)
620 {
621 monideal_pair *p = new monideal_pair(originalR, mi_stash);
622 monideals.push_back(p);
623 }
624
625 gbvector *fsyz = nullptr;
626 if (orig_syz >= 0)
627 {
628 if (orig_syz > n)
629 fsyz = GR->gbvector_term(
630 Fsyz, denom, n + 1); // Note the change in component number
631 gb_reduce(f, fsyz);
632 if (f == nullptr)
633 {
634 if (fsyz != nullptr && syz != nullptr)
635 syz->receive_generator(fsyz, n_syz++, GR->one());
636 }
637 else
638 {
639 isgen = true;
640 gb_insert(f, fsyz, 1);
641 }
642 }
643 else
644 {
645 gb_reduce(f, fsyz);
646 GR->gbvector_remove(fsyz);
647 GR->gbvector_remove_content(f, nullptr);
648 if (f != nullptr)
649 {
650 // schreyer_append(f);
651 isgen = true;
652 // gb_insert(f,Fsyz->e_sub_i(n_mingens),1);
653 // The fsyz part will be set at the end of the degree,
654 // after sorting takes place, and after auto-reduction in
655 // this degree.
656 gb_insert(f, nullptr, 1);
657 }
658 }
659 return isgen;
660}
int n_syz
Definition res-a2.hpp:144
gb_node * syz
Definition res-a2.hpp:137
FreeModule * Fsyz
Definition res-a2.hpp:121
void gb_insert(gbvector *f, gbvector *fsyz, int ismin)
int orig_syz
Definition res-a2.hpp:157
stash * mi_stash
Definition res-a2.hpp:118
void gb_reduce(gbvector *&f, gbvector *&fsyz)
const PolynomialRing * originalR
Definition res-a2.hpp:113
GBRing * GR
Definition res-a2.hpp:114
int p
size_t rank(const DMatZZpFFPACK &A)
Definition dmat.cpp:80

References Fsyz, gb_insert(), gb_reduce(), GR, mi_stash, n_syz, orig_syz, originalR, p, and syz.