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

◆ gb()

void gb ( IntermediateBasis & F,
int n )
extern

Definition at line 434 of file franzi-gb.cpp.

435{
436 int nextIndex = static_cast<int>(F.size());
437 rearrangeBasis(F, -1);
439 Pairs B = makeList(F, n);
440 // unsigned int countAddPoly = 0;
441 // unsigned int numSPoly= 0;
442 int interreductionCounter = 0;
443 while (!B.empty())
444 {
445 Pair pair = *(B.begin());
446 B.erase(B.begin());
447 if (isGoodPair(pair, F, B, n))
448 {
449 // numSPoly++;
450 BRP S = sPolynomial(pair, F, n);
451 reduce(S, F);
452 if (!S.isZero())
453 {
454 // countAddPoly++;
455 F[nextIndex] = S;
456 if (interreductionCounter == 5)
457 {
458 interreductionCounter = 0;
460 B = makeList(F, n);
461 }
462 else
463 {
464 interreductionCounter++;
465 Pairs newList = makeNewPairs(nextIndex, F, n);
466 B.insert(newList.begin(), newList.end());
467 }
468 nextIndex++;
469 }
470 }
471 }
473 // cout << "we computed " << numSPoly << " S Polynomials and added " <<
474 // countAddPoly << " of them to the intermediate basis." << endl;
475}
bool isZero() const
Boolean (F_2-coefficient) polynomial stored as an ordered list of square-free monomials.
S-pair record for the Franzi boolean Groebner basis algorithm.
Definition franzi-gb.cpp:25
Pairs makeList(const IntermediateBasis &F, int n)
void interreduction(IntermediateBasis &F)
Pairs makeNewPairs(int newIndex, const IntermediateBasis &F, int n)
BRP sPolynomial(const Pair &pair, const IntermediateBasis &F, int n)
void rearrangeBasis(IntermediateBasis &F, int nextIndex)
bool isGoodPair(const Pair &pair, const IntermediateBasis &F, const Pairs &B, int n)
std::set< Pair > Pairs
bool reduce(BRP &f, const IntermediateBasis &F, const IntermediateBasis::const_iterator itF)

References interreduction(), isGoodPair(), BRP::isZero(), makeList(), makeNewPairs(), rearrangeBasis(), reduce(), and sPolynomial().

Referenced by gbA::auto_reduce_by(), gb2_comp::calc_gb(), gb2_comp::change_matrix(), gbA::computation_is_complete(), gbA::compute_s_pair(), constructWordTable(), GBDeclared::create(), GBDeclared::create(), GB_comp::create_forced(), gbA::create_forced(), gbA::do_computation(), gb2_comp::end_degree(), gbA::find_good_divisor(), gbA::find_good_monomial_divisor_ZZ(), gbA::find_good_term_divisor_ZZ(), gb2_comp::gb_insert(), gb2_comp::gb_matrix(), gb2_comp::gb_sort_partition(), GBDeclared::GBDeclared(), GBDeclared::GBDeclared(), gbA::gbelem_text_out(), F4Computation::get_gb(), gbA::get_mingens(), IM2_GB_force(), gb2_comp::initial_matrix(), gbA::initialize(), GB_comp::initialize_forced(), gbA::insert_gb(), gbA::is_gcd_one_pair(), gb2_comp::make_lead_term_matrix(), gbA::make_lead_term_matrix(), MarkedGB_sorter::MarkedGB_sorter(), gb2_comp::min_gens_matrix(), gbA::minimalize_gb(), gbA::minimalize_pairs_ZZ(), NCBasis::NCBasis(), ncBasis(), MarkedGB_sorter::operator()(), ReducedGB_Field_Local_sorter::operator()(), ReducedGB_Field_sorter::operator()(), ReducedGB_ZZ_sorter::operator()(), gbA::pair_not_needed(), F4toM2Interface::poly_set_degrees(), rawGbBoolean(), rawGroebnerWalk(), rawMarkedGB(), gbA::reduce_kk(), gbA::reduce_ZZ(), ReducedGB_Field_Local_sorter::ReducedGB_Field_Local_sorter(), ReducedGB_Field_sorter::ReducedGB_Field_sorter(), ReducedGB_ZZ_sorter::ReducedGB_ZZ_sorter(), gbA::remainder_non_ZZ(), gbA::remainder_ZZ(), gbA::remove_gb(), gbA::remove_unneeded_pairs(), gbA::replace_gb_element_ZZ(), gbA::show(), gbA::show_mem_usage(), gbA::spair_COMPONENT(), gbA::spair_is_retired(), gbA::spair_make(), gbA::spair_make_skew(), gbA::spair_set_lead_spoly(), gb2_comp::stats(), gbA::tail_remainder_ZZ(), gb2_comp::text_out(), gbA::text_out(), F4toM2Interface::to_M2_MutableMatrix(), gbA::update_pairs(), gb2_comp::VECTOR(), gbA::VECTOR(), MarkedGB_sorter::VECTOR(), ReducedGB_Field_Local_sorter::VECTOR(), ReducedGB_Field_sorter::VECTOR(), ReducedGB_ZZ_sorter::VECTOR(), and gb2_comp::~gb2_comp().