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

◆ makeMatrix()

void F4Res::makeMatrix ( )
private

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

409{
410 // std::cout << "entering makeMatrix()" << std::endl;
411 auto& myframe = mFrame.level(mThisLevel);
412 long r = 0;
413 long comp = 0;
414 for (auto it = myframe.begin(); it != myframe.end(); ++it)
415 {
416 if (it->mDegree == mThisDegree)
417 {
418 mSPairs.push_back(Row());
419 mSPairComponents.push_back(comp);
420 Row& row = mSPairs[r];
421 r++;
422 row.mLeadTerm = it->mMonom;
423 loadRow(row);
424 if (M2_gbTrace >= 4)
425 if (r % 5000 == 0)
426 std::cout << "makeMatrix sp: " << r
427 << " #rows = " << mColumns.size() << std::endl;
428 }
429 comp++;
430 }
431 // Now we process all monomials in the columns array
432 while (mNextReducerToProcess < mColumns.size())
433 {
434 // Warning: mReducers is being appended to during 'loadRow', and
435 // since we act on the Row directly, it might get moved on us!
436 // (actually, it did get moved, which prompted this fix)
437 Row thisrow;
439 loadRow(thisrow);
442 if (M2_gbTrace >= 4)
443 if (mNextReducerToProcess % 5000 == 0)
444 std::cout << "makeMatrix red: " << mNextReducerToProcess
445 << " #rows = " << mReducers.size() << std::endl;
446 }
447
449
450#if 0
453 std :: cout << "-- reducer matrix --" << std::endl;
456
457 std :: cout << "-- spair matrix --" << std::endl;
460#endif
461}
void debugOutputReducers()
Definition res-f4.cpp:705
void reorderColumns()
Definition res-f4.cpp:300
int mThisDegree
Definition res-f4.hpp:165
void debugOutputColumns()
Definition res-f4.cpp:715
int mThisLevel
Definition res-f4.hpp:164
std::vector< res_packed_monomial > mColumns
Definition res-f4.hpp:184
void debugOutputMatrixSparse(std::vector< Row > &)
Definition res-f4.cpp:726
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
std::vector< long > mSPairComponents
Definition res-f4.hpp:182
void loadRow(Row &r)
Definition res-f4.cpp:226
long mNextReducerToProcess
Definition res-f4.hpp:166
std::vector< Row > mSPairs
Definition res-f4.hpp:181
int M2_gbTrace
Definition m2-types.cpp:52
void swap(mpfr::mpreal &x, mpfr::mpreal &y)
Definition mpreal.h:3244
One row of the Macaulay matrix built by F4Res::construct.
Definition res-f4.hpp:119

References debugOutputColumns(), debugOutputMatrix(), debugOutputMatrixSparse(), debugOutputReducers(), loadRow(), M2_gbTrace, mColumns, mFrame, F4Res::Row::mLeadTerm, mNextReducerToProcess, mReducers, mSPairComponents, mSPairs, mThisDegree, mThisLevel, reorderColumns(), and std::swap().

Referenced by construct().