Changeset 52e2f6 in git for kernel/gr_kstd2.cc
- Timestamp:
- Jun 10, 2008, 12:17:33 PM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 28325ab307b0d45f178c4ce869547de7d3f3faa7
- Parents:
- f2b58394b7c0b28984794adfcef85f56f72e35bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
rf2b5839 r52e2f6 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1.1 3 2007-02-07 10:49:39 SingularExp $ */4 /* $Id: gr_kstd2.cc,v 1.14 2008-06-10 10:17:31 motsak Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: noncomm. alg. of Buchberger … … 500 500 { 501 501 strat->fromT=FALSE; 502 (*h).p = gnc_ReduceSpolyNew(pi,(*h).p,strat->kNoether,currRing);502 (*h).p = nc_ReduceSpoly(pi,(*h).p,strat->kNoether,currRing); 503 503 } 504 504 else … … 814 814 } 815 815 816 #define MYTEST 0 817 816 818 ideal gnc_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat) 817 819 { 820 #if MYTEST 821 PrintS("<gnc_gr_bba>\n"); 822 #endif 823 824 #ifdef HAVE_PLURAL 825 #if MYTEST 826 PrintS("currRing: \n"); 827 rWrite(currRing); 828 #ifdef RDEBUG 829 rDebugPrint(currRing); 830 #endif 831 832 PrintS("F: \n"); 833 idPrint(F); 834 PrintS("Q: \n"); 835 idPrint(Q); 836 #endif 837 #endif 838 839 840 818 841 assume(pOrdSgn != -1); // no mora!!! it terminates only for global ordering!!! (?) 819 842 … … 835 858 srmax = strat->sl; 836 859 reduc = olddeg = lrmax = 0; 860 837 861 /* compute------------------------------------------------------- */ 838 862 while (strat->Ll >= 0) 839 863 { 840 864 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ 865 841 866 if (TEST_OPT_DEBUG) messageSets(strat); 867 842 868 if (strat->Ll== 0) strat->interpt=TRUE; 843 869 if (TEST_OPT_DEGBOUND … … 858 884 strat->Ll--; 859 885 //kTest(strat); 886 887 if (strat->P.p != NULL) 860 888 if (pNext(strat->P.p) == strat->tail) 861 889 { … … 863 891 pLmFree(strat->P.p); 864 892 /* the real one */ 865 if ((ncRingType(currRing)==nc_lie) && pHasNotCF(strat->P.p1,strat->P.p2)) /* prod crit */ 866 { 867 strat->cp++; 868 /* prod.crit itself in nc_CreateSpoly */ 869 } 893 if (ncRingType(currRing)==nc_lie) /* prod crit */ 894 if(pHasNotCF(strat->P.p1,strat->P.p2)) 895 { 896 // strat->cp++; 897 /* prod.crit itself in nc_CreateSpoly */ 898 } 899 870 900 strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing); 871 } 901 902 #ifdef PDEBUG 903 p_Test(strat->P.p, currRing); 904 #endif 905 906 #if MYTEST 907 if (TEST_OPT_DEBUG) 908 { 909 PrintS("p1: "); pWrite(strat->P.p1); 910 PrintS("p2: "); pWrite(strat->P.p2); 911 PrintS("SPoly: "); pWrite(strat->P.p); 912 } 913 #endif 914 } 915 916 872 917 if (strat->P.p != NULL) 873 918 { 874 919 if (TEST_OPT_PROT) 875 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),920 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(), 876 921 &olddeg,&reduc,strat, red_result); 922 923 #if MYTEST 924 if (TEST_OPT_DEBUG) 925 { 926 PrintS("p1: "); pWrite(strat->P.p1); 927 PrintS("p2: "); pWrite(strat->P.p2); 928 PrintS("SPoly before: "); pWrite(strat->P.p); 929 } 930 #endif 931 877 932 /* reduction of the element chosen from L */ 878 933 strat->red(&strat->P,strat); 934 935 #if MYTEST 936 if (TEST_OPT_DEBUG) 937 { 938 PrintS("red SPoly: "); pWrite(strat->P.p); 939 } 940 #endif 941 879 942 } 880 943 if (strat->P.p != NULL) … … 913 976 if (TEST_OPT_DEBUG) 914 977 { 915 PrintS("new s:"); 916 wrp(strat->P.p); 978 PrintS("new s:"); wrp(strat->P.p); 917 979 PrintLn(); 980 #if MYTEST 981 Print("s: "); pWrite(strat->P.p); 982 #endif 983 918 984 } 919 985 // kTest(strat); 920 986 // 921 987 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat); 988 922 989 if (strat->sl==-1) pos=0; 923 990 else pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 991 924 992 strat->enterS(strat->P,pos,strat,-1); 925 993 } … … 977 1045 /* Print("Total pairs considered:%d\n",zaehler); zaehler=0; */ 978 1046 #endif /*PDEBUG*/ 1047 1048 #if MYTEST 1049 PrintS("</gnc_gr_bba>\n"); 1050 #endif 1051 979 1052 return (strat->Shdl); 980 1053 }
Note: See TracChangeset
for help on using the changeset viewer.