301{
302
303
304
305
306
307#if 0
308 std::cout << "-- rows --" << std::endl;
310 std::cout << "-- columns --" << std::endl;
312
313 std::cout << "reorderColumns" << std::endl;
314#endif
316
318
319 auto timeA =
timer();
321 auto column_order = sorter.sort();
322 auto timeB =
timer();
323 double nsec_sort2 =
seconds(timeB - timeA);
324 mFrame.timeSortMatrix += nsec_sort2;
325 auto ncompares = sorter.numComparisons();
326
328 std::cout << " #comparisons sorting " << ncols << " columns = " << ncompares << " ";
329
331 std::cout << " sort time: " << nsec_sort2 << std::endl;
332
335
337 {
338 ord[column_order[i]] = i;
339 }
340
341#if 0
342 std::cout << "column_order: ";
343 for (
ComponentIndex i=0; i<ncols; i++) std::cout <<
" " << column_order[i];
344 std::cout << std::endl;
345 std::cout << "ord: ";
346 for (
ComponentIndex i=0; i<ncols; i++) std::cout <<
" " << ord[i];
347 std::cout << std::endl;
348#endif
349
350 std::vector<res_packed_monomial> sortedColumnArray;
351 std::vector<Row> sortedRowArray;
352
353 sortedColumnArray.reserve(ncols);
354 sortedRowArray.reserve(ncols);
355
357 {
359 sortedColumnArray.push_back(
mColumns[newc]);
360 sortedRowArray.push_back(
Row());
362 }
363
366
367#if 0
368 std::cout << "applying permutation to reducers" << std::endl;
369#endif
370
372 {
373#if 0
374 std::cout << "reducer " << i << " before:";
376 std::cout << std::endl;
377#endif
379#if 0
380 std::cout << "reducer " << i << " after:";
382 std::cout << std::endl;
383#endif
384 }
385#if 0
386 std::cout << "applying permutation to spairs" << std::endl;
387#endif
389 {
390#if 0
391 std::cout << "spair " << i << " before:";
393 std::cout << std::endl;
394#endif
396#if 0
397 std::cout << "spair " << i << " after:";
399 std::cout << std::endl;
400#endif
401 }
402
405 delete[] ord;
406}
void debugOutputReducers()
const ResPolyRing & ring() const
void debugOutputColumns()
const ResMonoid & monoid() const
std::vector< res_packed_monomial > mColumns
std::vector< Row > mReducers
std::vector< Row > mSPairs
void swap(mpfr::mpreal &x, mpfr::mpreal &y)
static void applyPermutation(ComponentIndex *permutation, std::vector< ComponentIndex > &entries)
One row of the Macaulay matrix built by F4Res::construct.
std::chrono::steady_clock::time_point timer()
double seconds(DurationType time_diff)