Changeset 6bef24 in git
- Timestamp:
- Jan 29, 2018, 11:28:57 PM (6 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- f4cb688bd460cad06792559a83e52103e9699d83
- Parents:
- c78b59f1964d52b7ab1abd2e0537f5007227690a
- git-author:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2018-01-29 23:28:57+01:00
- git-committer:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2018-02-02 11:16:48+01:00
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rc78b59f r6bef24 2222 2222 if (strcmp(method, "complete") != 0 2223 2223 && strcmp(method, "frame") != 0 2224 && strcmp(method, "extended frame") != 0) { 2224 && strcmp(method, "extended frame") != 0 2225 && strcmp(method, "single module") != 0) { 2225 2226 WerrorS("wrong optional argument for fres"); 2226 2227 } -
kernel/GBEngine/syz4.cc
rc78b59f r6bef24 552 552 } 553 553 554 static void delete_tails(resolvente res, const int index) 555 { 556 const ring r = currRing; 557 for (int i = 0; i < res[index]->ncols; i++) { 558 if (res[index]->m[i] != NULL) { 559 p_Delete(&(res[index]->m[i]->next), r); 560 } 561 } 562 } 563 554 564 /* 555 565 * for each step in the resolution, compute the corresponding module until … … 557 567 */ 558 568 static int computeResolution(resolvente res, const int max_index, 559 syzHeadFunction *syzHead, const bool do_lifting) 569 syzHeadFunction *syzHead, const bool do_lifting, 570 const bool single_module) 560 571 { 561 572 int index = 0; … … 568 579 if (do_lifting) { 569 580 computeLiftings(res, index, variables); 581 if (single_module) { 582 delete_tails(res, index-1); 583 } 570 584 } 571 585 if (index >= max_index) { break; } … … 579 593 580 594 static void set_options(syzHeadFunction **syzHead_ptr, bool *do_lifting_ptr, 581 const char *method)595 bool *single_module_ptr, const char *method) 582 596 { 583 597 if (strcmp(method, "complete") == 0) { // default 584 598 *syzHead_ptr = syzHeadExtFrame; 585 599 *do_lifting_ptr = true; 600 *single_module_ptr = false; 586 601 } 587 602 else if (strcmp(method, "frame") == 0) { 588 603 *syzHead_ptr = syzHeadFrame; 589 604 *do_lifting_ptr = false; 605 *single_module_ptr = false; 590 606 } 591 607 else if (strcmp(method, "extended frame") == 0) { 592 608 *syzHead_ptr = syzHeadExtFrame; 593 609 *do_lifting_ptr = false; 610 *single_module_ptr = false; 611 } 612 else if (strcmp(method, "single module") == 0) { 613 *syzHead_ptr = syzHeadExtFrame; 614 *do_lifting_ptr = true; 615 *single_module_ptr = true; 594 616 } 595 617 else { // "linear strand" (not yet implemented) 596 618 *syzHead_ptr = syzHeadExtFrame; 597 619 *do_lifting_ptr = true; 620 *single_module_ptr = false; 598 621 } 599 622 } … … 619 642 620 643 /* 621 * for each poly in the resolution, insert the first two terms at their right 622 * places 623 */ 624 static void insert_ext_induced_LTs(const resolvente res, const int length) 644 * For each poly in the resolution, insert the first two terms at their right 645 * places. If single_module is true, then only consider the last module. 646 */ 647 static void insert_ext_induced_LTs(const resolvente res, const int length, 648 const bool single_module) 625 649 { 626 650 const ring R = currRing; 627 651 poly p, q; 628 int index = 1;652 int index = (single_module ? length-1 : 1); 629 653 while (index < length && !idIs0(res[index])) { 630 654 for (int j = res[index]->ncols-1; j >= 0; j--) { … … 651 675 syzHeadFunction *syzHead; 652 676 bool do_lifting; 653 set_options(&syzHead, &do_lifting, method); 654 int new_length = computeResolution(res, length-1, syzHead, do_lifting); 677 bool single_module; 678 set_options(&syzHead, &do_lifting, &single_module, method); 679 int new_length = computeResolution(res, length-1, syzHead, do_lifting, 680 single_module); 655 681 if (new_length < length) { 656 682 res = (resolvente)omReallocSize(res, (length+1)*sizeof(ideal), … … 658 684 } 659 685 if (strcmp(method, "frame") != 0) { 660 insert_ext_induced_LTs(res, new_length );686 insert_ext_induced_LTs(res, new_length, single_module); 661 687 } 662 688 result->fullres = res;
Note: See TracChangeset
for help on using the changeset viewer.