Macaulay2 Engine
Loading...
Searching...
No Matches

◆ TEST() [1/19]

TEST ( FreeAlgebra ,
comparisons  )

Definition at line 412 of file NCGroebnerTest.cpp.

413{
415 { "x", "y", "z" },
416 degreeRing(1),
417 {1,2,3},
418 {},
419 {1}
420 );
421 FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A);
422 A->var(*x, 0);
423 A->var(*y, 1);
424 A->var(*z, 2);
425 EXPECT_TRUE(A->compare_elems(*x,*y) == GT);
426 EXPECT_TRUE(A->compare_elems(*y,*x) == LT);
427 EXPECT_TRUE(A->compare_elems(*x,*x) == EQ);
428}
const RingQQ * globalQQ
Definition aring.cpp:24
void var(Poly &result, int v) const
static FreeAlgebra * create(const Ring *K, const std::vector< std::string > &names, const PolynomialRing *degreeRing, const std::vector< int > &degrees, const std::vector< int > &wtvecs, const std::vector< int > &heftVector)
int compare_elems(const Poly &f, const Poly &g) const
Owned Poly value paired with its FreeAlgebra*, providing natural operator-overloaded arithmetic.
Free associative algebra over a coefficient ring: the non-commutative analogue of PolynomialRing.
volatile int x
const int EQ
Definition style.hpp:40
const int GT
Definition style.hpp:41
const int LT
Definition style.hpp:39
const PolynomialRing * degreeRing(const std::vector< std::string > &names)

References FreeAlgebra::compare_elems(), FreeAlgebra::create(), degreeRing(), EQ, globalQQ, GT, LT, FreeAlgebra::var(), and x.