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

◆ debugCheckOrder()

bool SchreyerFrame::debugCheckOrder ( int lev) const

Definition at line 670 of file res-schreyer-frame.cpp.

671{
672 if (lev == 0) return true;
673 bool result = true;
674 auto& mylevel = level(lev);
675 auto& myorder = schreyerOrder(lev - 1);
676 int which = 0;
677 for (auto i = mylevel.cbegin(); i != mylevel.cend(); ++i, ++which)
678 {
679 if (!check_poly(ring(), i->mSyzygy, myorder))
680 {
681 std::cout << "Error: terms of polynomial at level " << lev
682 << " location " << which << " not in order" << std::endl;
683 std::cout << " poly = ";
684 display_poly(std::cout, ring(), i->mSyzygy);
685 std::cout << std::endl;
686 result = false;
687 }
688 }
689 return result;
690}
std::vector< FrameElement > & level(int lev)
const ResPolyRing & ring() const
ResSchreyerOrder & schreyerOrder(int lev)
VALGRIND_MAKE_MEM_DEFINED & result(result)
bool check_poly(const ResPolyRing &R, const ResPolynomial &f, const ResSchreyerOrder &ord)
void display_poly(std::ostream &o, const ResPolyRing &R, const ResPolynomial &f)

References check_poly(), display_poly(), level(), result(), ring(), and schreyerOrder().

Referenced by debugCheckOrderAll().