Macaulay2 Engine
Loading...
Searching...
No Matches
Basis.hpp
Go to the documentation of this file.
1#pragma once
2
38
39#include "MonomialHashTable.hpp"
40#include "PolynomialList.hpp"
42
43namespace newf4 {
44
45// not a final choice of statuses
47
48inline std::string toString(GBPolyStatus status) {
49 switch (status) {
50 case GBPolyStatus::Gen: return "Gen";
51 case GBPolyStatus::MinGen: return "MinGen";
52 case GBPolyStatus::MinGB: return "MinGB";
53 case GBPolyStatus::NonMinGB: return "NonMinGB";
54 case GBPolyStatus::Retired: return "Retired";
55 };
56 return "Undefined";
57}
58
59// Basis: keeping the Groebner basis (and original generators)
60class Basis
61{
62private:
63 std::vector<GBPolyStatus> mGBStatusList;
65
66public:
68 MonomialHashTable& monHashTable)
69 : mPolynomialList(VA, monHashTable)
70 {
71 }
72
73 ~Basis() = default;
74
76 const VectorArithmetic& vectorArithmetic() const { return mPolynomialList.vectorArithmetic(); }
77 const std::vector<GBPolyStatus>& getGBStatusList() const { return mGBStatusList; }
78
79 // What functionality do we need here?
80 // wipe out a poly from basis
81 // add poly to the basis (and adjust other elements whose lead terms are div by the new poly)
82 // test divisibility both ways (monomial divisibility class)
83
84 // accessor functions
85
86};
87
88}
89
90// Local Variables:
91// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
92// indent-tabs-mode: nil
93// End:
newf4::MonomialHashFunction and the new-F4 monomial-to-index hash table.
Hash-table-keyed polynomial storage for the new F4.
Coefficient-ring-erased arithmetic dispatcher used by F4, GB, and resolution code.
Runtime dispatcher that hides the concrete coefficient ring behind a std::variant of ConcreteVectorAr...
const VectorArithmetic & vectorArithmetic() const
Definition Basis.hpp:76
Basis(const VectorArithmetic &VA, MonomialHashTable &monHashTable)
Definition Basis.hpp:67
~Basis()=default
std::vector< GBPolyStatus > mGBStatusList
Definition Basis.hpp:63
PolynomialList mPolynomialList
Definition Basis.hpp:64
const PolynomialList & getPolynomialList() const
Definition Basis.hpp:75
const std::vector< GBPolyStatus > & getGBStatusList() const
Definition Basis.hpp:77
std::string toString(GBPolyStatus status)
Definition Basis.hpp:48
GBPolyStatus
Definition Basis.hpp:46