494{
499 int toGo=0;
500 int il;
502 poly q;
504 SObject tso;
506#ifdef USE_HEURISTIC1
508 int there_are_superfluous=0;
509 int step=1,jj,j1,j2;
510#endif
512
514 if ((nextPairs==
NULL) || (howmuch==0))
return;
516 while ((ks>0) && (syzstr->
res[
index+1]->m[ks-1]==
NULL)) ks--;
518 while ((kres>0) &&
519 ((redset[kres-1].
p==
NULL) || (redset[kres-1].order>actord))) kres--;
520 while ((kres<(*syzstr->
Tl)[
index]) &&
521 (redset[kres-1].order!=0) && (redset[kres-1].order<=actord)) kres++;
523#ifdef SHOW_PROT
525#endif
529 {
531 if (actord<temp1_hilb->
length())
532 {
533 toGo = (*temp1_hilb)[actord];
534#ifdef SHOW_HILB
535Print(
"\nStze toGo im Modul %d und Grad %d auf: %d\n",1,actord-1,toGo);
536#endif
537 }
538 delete temp1_hilb;
539 }
540 else
541 {
543 {
545#ifdef SHOW_HILB
546Print(
"\nStze toGo im Modul %d und Grad %d auf: %d\n",
index,actord-1,toGo);
547#endif
548 }
549 }
552 {
554#ifdef SHOW_HILB
556#endif
557 }
558#ifdef SHOW_HILB
560#endif
561 while (kk>=0)
562 {
563 if (toGo==0)
564 {
565 while (kk>=0)
566 {
570 nextPairs[kk].p = nextPairs[kk].syz = nextPairs[kk].lcm =
NULL;
573#ifdef USE_HEURISTIC2
574 if (kk<0)
575 {
577 delete spl1;
578 spl1 = spl3;
582 }
583#endif
584 }
585 if (spl1!=
NULL)
delete spl1;
586 break;
587 }
588 tso = nextPairs[kk];
589 if ((tso.p1!=
NULL) && (tso.p2!=
NULL))
590 {
591#ifdef SHOW_CRIT
592 cons_pairs++;
593#endif
594
596#ifdef SHOW_PROT
597PrintS(
"reduziere Paar mit: \n");
602#endif
604 {
610 {
612 && ((redset[
j].ind1!=tso.ind1) || (redset[
j].ind2!=tso.ind2)))
613 {
614#ifdef SHOW_RED
623#endif
626 redset[
j].length,
NULL);
629#ifdef SHOW_RED
637#endif
640 }
641 else
642 {
644 }
645 }
648 }
649#ifdef SHOW_PROT
650PrintS(
"erhalte Paar mit: \n");
654#endif
655#ifdef SHOW_SPRFL
656
658Print(
" mit index %d, %d ",tso.ind1,tso.ind2);
659#endif
661 {
663 (*toSub)++;
664 toGo--;
666 {
671 }
676 }
677 else
678 {
683 {
685 toGo--;
688 ks++;
689 ks1++;
691 if (actord-
index>*maxdeg) *maxdeg = actord-
index;
692 }
693 else
694 {
696#ifdef SHOW_CRIT
697 spfl++;
698#endif
699#ifdef USE_HEURISTIC1
700 if (there_are_superfluous>=0)
701 {
704 j1 = 1;
705 while (jj>=0)
706 {
707 if (tso.ind2==nextPairs[jj].ind2)
708 {
710 j1++;
711 for (j2=
j;j2<spl1->
length()-1;j2++)
712 {
713 (*spl1)[j2] = (*spl1)[j2+1];
714 }
715 }
716 else
717 {
719 }
721 }
722 step++;
723 if (there_are_superfluous==0) there_are_superfluous = 1;
724 }
725#endif
726#ifdef SHOW_SPRFL
728
729
730
731#endif
732 }
735 tso.p = tso.syz = tso.lcm =
NULL;
736 }
737 nextPairs[kk] = tso;
738 }
739#ifdef SHOW_SPRFL
741#endif
743#ifdef SHOW_PROT
745Print(
"naechstes i ist: %d",
i);
746#endif
748#ifdef USE_HEURISTIC1
749 if ((kk<0) && (there_are_superfluous>0))
750 {
752 delete spl1;
753 spl1 = ivStrip(spl2);
754 delete spl2;
756 {
757 there_are_superfluous = -1;
759 }
760 }
761#endif
762#ifdef USE_HEURISTIC2
763 if ((kk<0) && (toGo>0))
764 {
765#ifdef SHOW_CRIT
766 crit_fails++;
767#endif
769 delete spl1;
770 spl1 = spl3;
774 }
775#endif
776 }
777 delete spl1;
778 if (spl3!=
NULL)
delete spl3;
779}
void show(int mat=0, int spaces=0) const
intvec * hHstdSeries(ideal S, intvec *modulweight, intvec *wdegree, ideal Q, ring tailRing)
#define IMATELEM(M, I, J)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
#define __p_Mult_nn(p, n, r)
static intvec * syLinStrat2(SSet nextPairs, syStrategy syzstr, int howmuch, int index, intvec **secondpairs)
void sySPRedSyz(syStrategy syzstr, sSObject redWith, poly q=NULL)