Changeset cdcbf3 in git
 Timestamp:
 Mar 10, 2017, 10:50:05 AM (7 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 c85a29d68f3b14b5466567b25ce4f175fd4d3512
 Parents:
 f4cb688bd460cad06792559a83e52103e9699d83
 gitauthor:
 Andreas Steenpass <steenpass@mathematik.unikl.de>20170310 10:50:05+01:00
 gitcommitter:
 Andreas Steenpass <steenpass@mathematik.unikl.de>20180202 11:16:48+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/GBEngine/syz4.cc
rf4cb688 rcdcbf3 529 529 std::vector<bool> &variables) 530 530 { 531 update_variables(variables, res[index1]);532 if (index == 2) { // we don't know if the input is a reduced SB533 variables[currRing>N] = false;534 }535 531 #if CACHE 536 532 initialize_cache(res[index1]>ncols); … … 552 548 } 553 549 550 static inline bool contains_unused_variable(const poly m, 551 const std::vector<bool> &variables) 552 { 553 const ring R = currRing; 554 for (int j = R>N; j > 0; j) { 555 if (!variables[j1] && p_GetExp(m, j, R) > 0) { 556 return true; 557 } 558 } 559 return false; 560 } 561 562 static void delete_variables(resolvente &res, const int index, 563 std::vector<bool> variables) 564 { 565 for (int i = 0; i < res[index]>ncols; i++) { 566 poly p_iter = res[index]>m[i]>next; 567 if (p_iter != NULL) { 568 while (p_iter>next != NULL) { 569 if (contains_unused_variable(p_iter>next, variables)) { 570 pLmDelete(&p_iter>next); 571 } else { 572 pIter(p_iter); 573 } 574 } 575 } 576 } 577 } 578 554 579 static void delete_tails(resolvente res, const int index) 555 580 { … … 576 601 std::vector<bool> variables; 577 602 variables.resize(currRing>N+1, true); 603 if (do_lifting) { 604 update_variables(variables, res[0]); 605 delete_variables(res, 0, variables); 606 } 578 607 while (!idIs0(res[index])) { 579 608 if (do_lifting) { … … 582 611 delete_tails(res, index1); 583 612 } 613 update_variables(variables, res[index]); 614 // we don't know if the input is a reduced SB: 615 if (index == 2) { 616 variables[currRing>N] = false; 617 } 618 delete_variables(res, index, variables); 584 619 } 585 620 if (index >= max_index) { break; }
Note: See TracChangeset
for help on using the changeset viewer.