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

gtest smoke tests covering the non-commutative GB pipeline end-to-end. More...

#include <iostream>
#include <memory>
#include <gtest/gtest.h>
#include "MemoryBlock.hpp"
#include "interface/ring.h"
#include "poly.hpp"
#include "aring-glue.hpp"
#include "NCAlgebras/FreeAlgebra.hpp"
#include "NCAlgebras/FreeAlgebraQuotient.hpp"
#include "NCAlgebras/WordTable.hpp"
#include "NCAlgebras/NCGroebner.hpp"
#include "NCAlgebras/OverlapTable.hpp"
#include "NCAlgebras/SuffixTree.hpp"
#include "NCAlgebras/NCReduction.hpp"
#include "monordering.hpp"
#include "monoid.hpp"
#include "util-polyring-creation.hpp"

Go to the source code of this file.

Functions

bool testMemoryBlock ()
 TEST (MemoryBlock, tryit)
void tryOutMathicCode ()
 TEST (NCReduction, tryit)
 TEST (NCReduction, TrivialPolynomialHeap)
 TEST (NCReduction, NaiveDedupPolynomialHeap)
 TEST (NCReduction, NaivePolynomialHeap)
 TEST (MonomialOrdering, create)
 TEST (FreeAlgebra, create)
 TEST (FreeAlgebra, polyarithmetic)
 TEST (FreeAlgebra, quotientArithmetic)
 TEST (FreeAlgebra, comparisons)
 TEST (FreeAlgebra, spairs)
 TEST (OverlapTable, insertion)
 TEST (NCGroebner, sorting)
 TEST (WordTable, create)
 TEST (WordTable, insert)
 TEST (WordTable, simpleSubwords)
 TEST (WordTable, subwords)
 TEST (WordTable, prefix_suffix)
std::ostream & operator<< (std::ostream &o, const std::vector< Overlap > &val)
std::ostream & operator<< (std::ostream &o, const std::vector< std::pair< int, int > > &val)
 TEST (WordTable, skylanin)

Variables

std::vector< intmonom1 {2, 0, 1}
std::vector< intmonom2 {2, 2}
std::vector< intmonom3 {1, 0, 1, 0}
std::vector< intword {2, 0, 1, 2, 2, 1, 0, 1, 0}

Detailed Description

gtest smoke tests covering the non-commutative GB pipeline end-to-end.

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

Exercises every layer of NCAlgebras/ together: builds FreeAlgebra and FreeAlgebraQuotient rings via util-polyring-creation, walks WordTable and SuffixTree insert / subwords / prefix_suffix queries against hand-rolled word inputs, runs NCReduction's PolynomialHeap variants (Trivial, Naive, NaiveDedup), and exercises OverlapTable insertion plus NCGroebner sorting under various inputs (including the skylanin stress case). Also covers MemoryBlock directly via the MemoryBlock.tryit allocation loop that catches arena bugs before they reach the GB tests.

The WordTable and SuffixTree coverage is load-bearing: missed overlaps would silently truncate a GB, so the test file emphasises construction and factor-search assertions. These tests form the regression net the AssociativeAlgebras package depends on.

See also
NCAlgebras/NCGroebner.hpp
NCAlgebras/SuffixTree.hpp
NCAlgebras/OverlapTable.hpp
NCAlgebras/NCReduction.hpp
util-polyring-creation.hpp

Definition in file NCGroebnerTest.cpp.