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

◆ construct()

void F4Res::construct ( int lev,
int degree )

Definition at line 640 of file res-f4.cpp.

641{
642 decltype(timer()) timeA, timeB;
643
644 resetMatrix(lev, degree);
645
646 if (M2_gbTrace >= 2)
647 std::cout << "construct (" << lev << "," << degree-lev << ")" << std::endl;
648
649 timeA = timer();
650 makeMatrix();
651 timeB = timer();
652 mFrame.timeMakeMatrix += seconds(timeB - timeA);
653
654 //if (M2_gbTrace >= 2) mHashTable.dump();
655
656 if (M2_gbTrace >= 2)
657 std::cout << " make (" << lev << "," << degree-lev << "): " << seconds(timeB - timeA) << " sec"
658 << std::endl;
659
660#if 0
661 std::cout << "-- rows --" << std::endl;
663 std::cout << "-- columns --" << std::endl;
665 std :: cout << "-- reducer matrix --" << std::endl;
666 if (true or lev <= 2)
668 else
670
671 std :: cout << "-- reducer matrix --" << std::endl;
674
675 std :: cout << "-- spair matrix --" << std::endl;
678#endif
679
680// if (M2_gbTrace >= 2)
681// std::cout << " (degree,level)=(" << (mThisDegree - mThisLevel) << ","
682// << mThisLevel << ") #spairs=" << mSPairs.size()
683// << " reducer= " << mReducers.size() << " x " << mReducers.size()
684// << std::endl;
685
686// if (M2_gbTrace >= 2) std::cout << " gauss reduce matrix" << std::endl;
687
688 timeA = timer();
689 gaussReduce();
690 timeB = timer();
691 mFrame.timeGaussMatrix += seconds(timeB - timeA);
692
693 if (M2_gbTrace >= 2)
694 std::cout << " gauss (" << lev << "," << degree-lev << "): " << seconds(timeB - timeA) << " sec"
695 << std::endl;
696// std::cout << " time: " << seconds(timeB - timeA) << " sec" << std::endl;
697 // mFrame.show(-1);
698
699 timeA = timer();
700 clearMatrix();
701 timeB = timer();
702 mFrame.timeClearMatrix += seconds(timeB - timeA);
703}
void debugOutputReducers()
Definition res-f4.cpp:705
void resetMatrix(int lev, int degree)
Definition res-f4.cpp:69
void gaussReduce()
Definition res-f4.cpp:579
void debugOutputColumns()
Definition res-f4.cpp:715
void debugOutputMatrixSparse(std::vector< Row > &)
Definition res-f4.cpp:726
void makeMatrix()
Definition res-f4.cpp:408
std::vector< Row > mReducers
Definition res-f4.hpp:179
SchreyerFrame & mFrame
Definition res-f4.hpp:159
void debugOutputMatrix(std::vector< Row > &)
Definition res-f4.cpp:739
void clearMatrix()
Definition res-f4.cpp:76
std::vector< Row > mSPairs
Definition res-f4.hpp:181
int M2_gbTrace
Definition m2-types.cpp:52
std::chrono::steady_clock::time_point timer()
Definition timing.hpp:35
double seconds(DurationType time_diff)
Definition timing.hpp:59

References clearMatrix(), debugOutputColumns(), debugOutputMatrix(), debugOutputMatrixSparse(), debugOutputReducers(), gaussReduce(), M2_gbTrace, makeMatrix(), mFrame, mReducers, mSPairs, resetMatrix(), seconds(), and timer().

Referenced by SchreyerFrame::fillinSyzygies().