Macaulay2 Engine
Loading...
Searching...
No Matches
NewF4Test.cpp File Reference

gtest coverage for the refactored F4 engine's hash table, lookup table, and PolynomialList. More...

#include <iostream>
#include <memory>
#include <bitset>
#include <gtest/gtest.h>
#include "polyring.hpp"
#include "util-polyring-creation.hpp"
#include "gb-f4/MonomialHashTable.hpp"
#include "gb-f4/MonomialLookupTable.hpp"
#include "VectorArithmetic.hpp"
#include "BasicPolyListParser.hpp"
#include "gb-f4/PolynomialList.hpp"

Go to the source code of this file.

Functions

 TEST (NewF4, hashstats)
newf4::HashInt hashFunction (const newf4::MonomialView &m)
 TEST (NewF4, hashtable)
 TEST (NewF4, matrixstream)
 TEST (NewF4MonomialLookupTable, mask_creation)
 TEST (NewF4MonomialLookupTable, monomialDivides)
 TEST (NewF4MonomialLookupTable, monomialOperations)

Detailed Description

gtest coverage for the refactored F4 engine's hash table, lookup table, and PolynomialList.

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

Hosts two gtest suites covering gb-f4/'s monomial-side infrastructure: TEST(NewF4, *) exercises HashTableStats accumulation, MonomialHashTable insertion / lookup with same-monomial-same-ID invariants (NewF4.hashtable), MatrixStream round-trips (NewF4.matrixstream), and PolynomialList construction via BasicPolyListParser; TEST(NewF4MonomialLookupTable, *) covers MonomialLookupTable mask creation, divisibility queries, and monomial-operation correctness. VectorArithmetic primitives get smoke-tested in the same pass so the matrix-row arithmetic consuming the hash-table indices is validated alongside.

Both suites share the *F4* prefix so the developer recipe at the top of the file — M2-unit-tests --gtest_filter="*F4*" — runs them together. Ring construction goes through util-polyring-creation to keep each test focused on the F4-side assertions.

See also
gb-f4/MonomialHashTable.hpp
gb-f4/MonomialLookupTable.hpp
gb-f4/PolynomialList.hpp
VectorArithmetic.hpp
util-polyring-creation.hpp

Definition in file NewF4Test.cpp.