Macaulay2 Engine
Loading...
Searching...
No Matches
SPairs.hpp File Reference

newf4::SPair / SPairSet — typed S-pair queue grouped by degree and S-pair flavour. More...

#include "MonomialTypes.hpp"
#include "MonomialView.hpp"
#include "Basis.hpp"
#include <map>

Go to the source code of this file.

Classes

struct  newf4::SPair
class  newf4::SPairSet
class  newf4::SPairSet::SPairIterator

Namespaces

namespace  newf4

Enumerations

enum class  newf4::SPairType { newf4::Ring , newf4::Exterior , newf4::SPair , newf4::Gen }

Detailed Description

newf4::SPair / SPairSet — typed S-pair queue grouped by degree and S-pair flavour.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares the per-pair record and the queue the refactored F4 will use to schedule the matrix it builds each degree. SPair tags each entry with an SPairTypeRing (between a basis element and a ring-relation generator, for GB over a quotient), Exterior (the var * lead = 0 cancellations exterior algebras require), SPair (between two basis elements), or Gen (an original input still pending insertion) — and carries the basis indices mFirst / mLast, the LCM's MonomialIndex mLCM into the S-pair monomial hash table, the cached MonomialInt mDegree of the LCM, and a still-tentative mQuotient field flagged "we might not need" in the source.

Storage is std::map<std::pair<long, SPairType>, vector<SPair>> mSPairsByDegree (the long is sugar degree), so the driver can pop the next degree's work in one chunk via getNextDegree, and so within each degree the std::map ordering puts Ring / Exterior ahead of SPair / Gen (the enum is declared in that order) — the standard "lighter reductions first" pattern.

This header is part of the long-running F4 refactor noted in TODO-refactor-f4. The companion SPairs.cpp is currently empty, so updatePairs(basis, which), getNextDegree(), and the placeholder SPairIterator {} class are declared but have no bodies; the planned two-stage "pre-S-pair / S-pair" split sketched in the in-file brainstorming comments is still on the drawing board.

See also
Basis.hpp
MonomialView.hpp
MonomialTypes.hpp
MacaulayMatrix.hpp
GBF4Computation.hpp

Definition in file SPairs.hpp.