Macaulay2 Engine
Loading...
Searching...
No Matches
util-polyring-creation.hpp File Reference

One-line helpers for building degree monoids and polynomial rings inside gtest cases. More...

#include <iostream>
#include <memory>
#include <gtest/gtest.h>
#include <vector>
#include "interface/monomial-ordering.h"
#include "monordering.hpp"
#include "interface/ring.h"
#include "interface/aring.h"
#include "monoid.hpp"
#include "poly.hpp"
#include "polyring.hpp"

Go to the source code of this file.

Functions

const MonoiddegreeMonoid (const std::vector< std::string > &names)
const PolynomialRingdegreeRing (const std::vector< std::string > &names)
const PolynomialRingdegreeRing (int ndegrees)
const PolynomialRingsimplePolynomialRing (const Ring *kk, const std::vector< std::string > &names, MonomialOrdering *monorder)
const PolynomialRingsimplePolynomialRing (int p, const std::vector< std::string > &names)

Detailed Description

One-line helpers for building degree monoids and polynomial rings inside gtest cases.

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

Declares degreeMonoid(names) and the two overloads of degreeRing(...) (variable-name list or fixed ndegrees) that wrap the engine-side boilerplate of constructing a degree monoid; plus simplePolynomialRing(kk, names, monorder) and its variant simplePolynomialRing(p, names) which builds a Z/p GRevLex polynomial ring with all degree-1 variables. Tests pull these in to replace ~10 lines of monomial-order / monoid / ring plumbing per fixture.

Heavily used by NewF4Test.cpp, NCGroebnerTest.cpp, MatrixIOTest.cpp, and PolyRingTest.cpp. Companion to the .cpp implementation file under the same file-test-harness markdown family.

See also
polyring.hpp
monoid.hpp
interface/monomial-ordering.h
NewF4Test.cpp

Definition in file util-polyring-creation.hpp.