Changeset c7aad0 in git
- Timestamp:
- Sep 27, 2011, 6:04:08 PM (12 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- c14846c48e3ff9e4167bc71fd6c4c4cf2f7d6e03
- Parents:
- a0a9f0d6ddf91bf97a108e81a1b1415c0ad58615
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-27 18:04:08+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:38+01:00
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
ra0a9f0 rc7aad0 217 217 pDelete(&f); 218 218 } 219 219 220 #ifdef HAVE_RATGRING 220 221 /*2 -
kernel/kstd1.cc
ra0a9f0 rc7aad0 52 52 #include <polys/nc/nc.h> 53 53 #include <polys/nc/sca.h> 54 #include <kernel/nc.h> 54 55 #endif 55 56 -
kernel/nc.h
ra0a9f0 rc7aad0 6 6 #include <polys/simpleideals.h> 7 7 8 8 #include <kernel/polys.h> 9 9 10 10 /// Compute two-sided GB: … … 13 13 /// Ann: ??? 14 14 ideal Approx_Step(ideal L); 15 16 class skStrategy; 17 typedef skStrategy * kStrategy; 18 19 // ideal gnc_gr_mora(const ideal, const ideal, const intvec *, const intvec *, kStrategy/*, const ring r*/); // Not yet! 20 ideal gnc_gr_bba (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat/*, const ring r*/); 21 22 23 static inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r) 24 { 25 assume(rIsPluralRing(r)); 26 27 const ring save = currRing; 28 29 if( save != r ) 30 rChangeCurrRing(r); 31 32 /////////// rGR->GetNC()->p_Procs.GB = gnc_gr_bba; // bba even for local case! 33 // old /// r->GetNC()->GB() = gnc_gr_bba; 34 35 // rGR->GetNC()->p_Procs.GlobalGB = gnc_gr_bba; 36 // rGR->GetNC()->p_Procs.LocalGB = gnc_gr_mora; 37 38 // assume(r->GetNC()->p_Procs.GB!=NULL); 39 // return r->GetNC()->p_Procs.GB(F, Q, w, hilb, strat, r); 40 ideal res = gnc_gr_bba(F, Q, w, hilb, strat/*, r*/); 41 42 43 /* 44 // Modified Plural's Buchberger's algorithmus. 45 ideal sca_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing); 46 47 // Modified modern Sinuglar Buchberger's algorithm. 48 ideal sca_bba(const ideal F, const ideal Q, const intvec *w, const intvec *, kStrategy strat, const ring _currRing); 49 50 // Modified modern Sinuglar Mora's algorithm. 51 ideal sca_mora(const ideal F, const ideal Q, const intvec *w, const intvec *, kStrategy strat, const ring _currRing); 52 */ 53 54 55 /* 56 if (rHasLocalOrMixedOrdering(rGR)) 57 { 58 #ifdef PDEBUG 59 // Print("Local case => GB == mora!\n"); 60 #endif 61 rGR->GetNC()->p_Procs.GB = NULL; // sca_mora; // local ordering => Mora, otherwise - Buchberger! 62 } 63 else 64 { 65 #ifdef PDEBUG 66 // Print("Global case => GB == bba!\n"); 67 #endif 68 rGR->GetNC()->p_Procs.GB = NULL; // sca_bba; // sca_gr_bba; // sca_bba? // sca_bba; 69 } 70 // rGR->GetNC()->p_Procs.GlobalGB = sca_gr_bba; 71 // rGR->GetNC()->p_Procs.LocalGB = sca_mora; 72 73 74 ///// r->GetNC()->GB() = sca_gr_bba; 75 */ 76 if( save != r ) 77 rChangeCurrRing(save); 78 79 return (res); 80 } 81 /* 82 83 // typedef ideal (*GB_Proc_Ptr)(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r); 84 GB_Proc_Ptr GB; 85 // GlobalGB, // BBA 86 // LocalGB; // MORA 87 */ 15 88 16 89 -
libpolys/polys/nc/nc.h
ra0a9f0 rc7aad0 16 16 class ip_smatrix; 17 17 typedef ip_smatrix * matrix; 18 19 class skStrategy;20 typedef skStrategy * kStrategy;21 18 22 19 … … 62 59 63 60 64 typedef ideal (*GB_Proc_Ptr)(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r);65 66 61 typedef poly (*SPoly_Proc_Ptr)(const poly p1, const poly p2, const ring r); 67 62 typedef poly (*SPolyReduce_Proc_Ptr)(const poly p1, poly p2, const ring r); … … 80 75 SPoly_Proc_Ptr SPoly; 81 76 SPolyReduce_Proc_Ptr ReduceSPoly; 82 83 GB_Proc_Ptr GB;84 // GlobalGB, // BBA85 // LocalGB; // MORA86 77 }; 87 78 … … 321 312 } 322 313 323 static inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)324 {325 assume(rIsPluralRing(r));326 327 assume(r->GetNC()->p_Procs.GB!=NULL);328 return r->GetNC()->p_Procs.GB(F, Q, w, hilb, strat, r);329 }330 331 332 314 333 315 /* subst: */ -
libpolys/polys/nc/old.gring.cc
ra0a9f0 rc7aad0 69 69 poly nc_p_Bracket_qq(poly p, const poly q, const ring r); 70 70 71 int iNCExtensions = 0 x00001; // only SCA can be used by default71 int iNCExtensions = 0; // SCAMASK; // only SCA can be used by default 72 72 73 73 … … 145 145 146 146 // void nc_kBucketPolyRed(kBucket_pt b, poly p); 147 148 // ideal gnc_gr_mora(const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring r); // Not yet!149 // ideal gnc_gr_bba (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring r);150 151 147 152 148 void nc_CleanUp(nc_struct* p); // just free memory! … … 3213 3209 rGR->GetNC()->p_Procs.mm_Mult_pp = gnc_mm_Mult_pp; 3214 3210 3215 /////////// rGR->GetNC()->p_Procs.GB = gnc_gr_bba; // bba even for local case!3216 3217 // rGR->GetNC()->p_Procs.GlobalGB = gnc_gr_bba;3218 // rGR->GetNC()->p_Procs.LocalGB = gnc_gr_mora;3219 3220 3221 3211 #if 0 3222 3212 // Previous Plural's implementation... … … 3251 3241 r->GetNC()->mmMultP() = gnc_mm_Mult_p; 3252 3242 r->GetNC()->mmMultPP() = gnc_mm_Mult_pp; 3253 3254 ////////////// r->GetNC()->GB() = gnc_gr_bba;3255 3243 3256 3244 r->GetNC()->SPoly() = gnc_CreateSpoly; -
libpolys/polys/nc/sca.cc
ra0a9f0 rc7aad0 81 81 poly sca_ReduceSpoly(const poly p1, poly p2, const ring r); 82 82 83 /*84 // Modified Plural's Buchberger's algorithmus.85 ideal sca_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing);86 87 // Modified modern Sinuglar Buchberger's algorithm.88 ideal sca_bba(const ideal F, const ideal Q, const intvec *w, const intvec *, kStrategy strat, const ring _currRing);89 90 // Modified modern Sinuglar Mora's algorithm.91 ideal sca_mora(const ideal F, const ideal Q, const intvec *w, const intvec *, kStrategy strat, const ring _currRing);92 */93 94 95 83 96 84 //////////////////////////////////////////////////////////////////////////////////////////////////// 97 85 // Super Commutative Algebra extension by Oleksandr 98 86 //////////////////////////////////////////////////////////////////////////////////////////////////// 99 100 /*101 static inline ring assureCurrentRing(ring r)102 {103 ring save = currRing;104 105 if( currRing != r )106 rChangeCurrRing(r);107 108 return save;109 }110 */111 112 113 87 114 88 // returns the sign of: lm(pMonomM) * lm(pMonomMM), … … 932 906 } 933 907 934 /*935 void addLObject(LObject& h, kStrategy& strat)936 {937 if(h.IsNull()) return;938 939 strat->initEcart(&h);940 h.sev=0; // pGetShortExpVector(h.p);941 942 // add h into S and L943 int pos=posInS(strat, strat->sl, h.p, h.ecart);944 945 if ( (pos <= strat->sl) && (pComparePolys(h.p, strat->S[pos])) )946 {947 if (TEST_OPT_PROT)948 PrintS("d\n");949 }950 else951 {952 if (TEST_OPT_INTSTRATEGY)953 {954 p_Cleardenom(h.p, currRing);955 }956 else957 {958 pNorm(h.p);959 p_Content(h.p,currRing);960 }961 962 if ((strat->syzComp==0)||(!strat->homog))963 {964 h.p = redtailBba(h.p,pos-1,strat);965 966 if (TEST_OPT_INTSTRATEGY)967 {968 // pCleardenom(h.p);969 p_Content(h.p,currRing);970 }971 else972 {973 pNorm(h.p);974 }975 }976 977 if(h.IsNull()) return;978 979 // statistic980 if (TEST_OPT_PROT)981 {982 PrintS("s\n");983 }984 985 #ifdef KDEBUG986 if (TEST_OPT_DEBUG)987 {988 PrintS("new s:");989 wrp(h.p);990 PrintLn();991 }992 #endif993 994 enterpairs(h.p, strat->sl, h.ecart, 0, strat);995 996 pos=0;997 998 if (strat->sl!=-1) pos = posInS(strat, strat->sl, h.p, h.ecart);999 strat->enterS(h, pos, strat, -1);1000 // enterT(h, strat); // ?!1001 1002 if (h.lcm!=NULL) pLmFree(h.lcm);1003 }1004 1005 1006 }1007 1008 */1009 1010 1011 1012 ideal sca_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)1013 {1014 /*1015 #if MYTEST1016 PrintS("<sca_gr_bba>\n");1017 #endif1018 1019 assume(rIsSCA(currRing));1020 1021 #ifndef NDEBUG1022 idTest(F);1023 idTest(Q);1024 #endif1025 1026 #ifdef HAVE_PLURAL1027 #if MYTEST1028 PrintS("currRing: \n");1029 rWrite(currRing);1030 #ifdef RDEBUG1031 rDebugPrint(currRing);1032 #endif1033 1034 PrintS("F: \n");1035 idPrint(F);1036 PrintS("Q: \n");1037 idPrint(Q);1038 #endif1039 #endif1040 1041 1042 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);1043 const unsigned int m_iLastAltVar = scaLastAltVar(currRing);1044 1045 ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);1046 ideal tempQ = Q;1047 1048 if(Q == currQuotient)1049 tempQ = SCAQuotient(currRing);1050 1051 strat->z2homog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!1052 // redo: no_prod_crit1053 const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit1054 strat->no_prod_crit = ! bIsSCA;1055 1056 // strat->homog = strat->homog && strat->z2homog; // ?1057 1058 #if MYTEST1059 {1060 PrintS("ideal tempF: \n");1061 idPrint(tempF);1062 PrintS("ideal tempQ: \n");1063 idPrint(tempQ);1064 }1065 #endif1066 1067 #ifdef KDEBUG1068 om_Opts.MinTrack = 5;1069 #endif1070 1071 int srmax, lrmax;1072 int olddeg, reduc;1073 int red_result = 1;1074 // int hilbeledeg = 1, minimcnt = 0;1075 int hilbcount = 0;1076 1077 initBuchMoraCrit(strat); // set Gebauer, honey, sugarCrit1078 1079 nc_gr_initBba(tempF,strat); // set enterS, red, initEcart, initEcartPair1080 1081 initBuchMoraPos(strat);1082 1083 1084 // ?? set spSpolyShort, reduce ???1085 1086 initBuchMora(tempF, tempQ, strat); // SCAQuotient(currRing) instead of Q == squares!!!!!!!1087 1088 strat->posInT=posInT110; // !!!1089 1090 srmax = strat->sl;1091 reduc = olddeg = lrmax = 0;1092 1093 1094 // compute-------------------------------------------------------1095 for(; strat->Ll >= 0;1096 #ifdef KDEBUG1097 strat->P.lcm = NULL,1098 #endif1099 kTest(strat)1100 )1101 {1102 if (strat->Ll > lrmax) lrmax =strat->Ll;// stat.1103 1104 #ifdef KDEBUG1105 if (TEST_OPT_DEBUG) messageSets(strat);1106 #endif1107 1108 if (strat->Ll== 0) strat->interpt=TRUE;1109 1110 if (TEST_OPT_DEGBOUND1111 && ((strat->honey1112 && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))1113 || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))1114 {1115 // stops computation if1116 // 24 IN test and the degree +ecart of L[strat->Ll] is bigger then1117 // a predefined number Kstd1_deg1118 while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);1119 break;1120 }1121 1122 // picks the last element from the lazyset L1123 strat->P = strat->L[strat->Ll];1124 strat->Ll--;1125 1126 //kTest(strat);1127 1128 // assume(pNext(strat->P.p) != strat->tail); // !???1129 if(strat->P.IsNull()) continue;1130 1131 1132 if( pNext(strat->P.p) == strat->tail )1133 {1134 // deletes the int spoly and computes SPoly1135 pLmFree(strat->P.p); // ???1136 strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);1137 }1138 1139 if(strat->P.IsNull()) continue;1140 1141 // poly save = NULL;1142 //1143 // if(pNext(strat->P.p) != NULL)1144 // save = p_Copy(strat->P.p, currRing);1145 1146 strat->initEcart(&strat->P); // remove it?1147 1148 if (TEST_OPT_PROT)1149 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(), &olddeg,&reduc,strat, red_result);1150 1151 // reduction of the element chosen from L wrt S1152 strat->red(&strat->P,strat);1153 1154 if(strat->P.IsNull()) continue;1155 1156 addLObject(strat->P, strat);1157 1158 if (strat->sl > srmax) srmax = strat->sl;1159 1160 const poly save = strat->P.p;1161 1162 #ifdef PDEBUG1163 p_Test(save, currRing);1164 #endif1165 assume( save != NULL );1166 1167 // SCA Specials:1168 1169 {1170 const poly p_next = pNext(save);1171 1172 if( p_next != NULL )1173 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )1174 if( p_GetExp(save, i, currRing) != 0 )1175 {1176 assume(p_GetExp(save, i, currRing) == 1);1177 1178 const poly tt = sca_pp_Mult_xi_pp(i, p_next, currRing);1179 1180 #ifdef PDEBUG1181 p_Test(tt, currRing);1182 #endif1183 1184 if( tt == NULL) continue;1185 1186 LObject h(tt); // h = x_i * P1187 1188 if (TEST_OPT_INTSTRATEGY)1189 {1190 // h.pCleardenom(); // also does a p_Content1191 p_Content(h.p,currRing);1192 }1193 else1194 {1195 h.pNorm();1196 }1197 1198 strat->initEcart(&h);1199 1200 1201 // if (pOrdSgn==-1)1202 // {1203 // cancelunit(&h); // tries to cancel a unit1204 // deleteHC(&h, strat);1205 // }1206 1207 // if(h.IsNull()) continue;1208 1209 // if (TEST_OPT_PROT)1210 // message((strat->honey ? h.ecart : 0) + h.pFDeg(), &olddeg, &reduc, strat, red_result);1211 1212 // strat->red(&h, strat); // wrt S1213 // if(h.IsNull()) continue;1214 1215 // poly save = p_Copy(h.p, currRing);1216 1217 int pos;1218 1219 if (strat->Ll==-1)1220 pos =0;1221 else1222 pos = strat->posInL(strat->L,strat->Ll,&h,strat);1223 1224 h.sev = pGetShortExpVector(h.p);1225 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);1226 1227 // h.p = save;1228 // addLObject(h, strat);1229 1230 // if (strat->sl > srmax) srmax = strat->sl;1231 }1232 1233 // p_Delete( &save, currRing );1234 }1235 1236 1237 } // for(;;)1238 1239 1240 #ifdef KDEBUG1241 if (TEST_OPT_DEBUG) messageSets(strat);1242 #endif1243 1244 if (TEST_OPT_REDSB){1245 completeReduce(strat); // ???1246 }1247 1248 // release temp data--------------------------------1249 exitBuchMora(strat);1250 1251 if (TEST_OPT_WEIGHTM)1252 {1253 pFDeg=pFDegOld;1254 pLDeg=pLDegOld;1255 if (ecartWeights)1256 {1257 omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(int));1258 ecartWeights=NULL;1259 }1260 }1261 1262 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat);1263 1264 if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);1265 1266 id_Delete(&tempF, currRing);1267 1268 1269 // complete reduction of the standard basis---------1270 if (TEST_OPT_REDSB){1271 ideal I = strat->Shdl;1272 ideal erg = kInterRedOld(I,tempQ);1273 assume(I!=erg);1274 id_Delete(&I, currRing);1275 strat->Shdl = erg;1276 }1277 1278 1279 #if MYTEST1280 // PrintS("</sca_gr_bba>\n");1281 #endif1282 1283 return (strat->Shdl);1284 */1285 }1286 1287 1288 1289 908 // should be used only inside nc_SetupQuotient! 1290 909 // Check whether this our case: … … 1498 1117 // NOTE: rSaveRing == currRing now! 1499 1118 // NOTE: there is no better way to check this in general! 1500 1119 // 1501 1120 ////// TODO!!!!! 1502 1121 ////// extern poly kNF(ideal I, ideal Q, poly f, int a, int b, const ring r); … … 1513 1132 // assureCurrentRing(rSaveRing); 1514 1133 1515 if(!bSCA) return false; 1134 if(!bSCA) 1135 { 1136 WarnS("sca_SetupQuotient: Sorry can not use NF: unfixed implementational issue :("); 1137 return false; 1138 } 1139 1516 1140 1517 1141 … … 1625 1249 } 1626 1250 1627 1628 ///////////////////////////////////////////////////////////////////////////////////////1629 //************* SCA BBA *************************************************************//1630 ///////////////////////////////////////////////////////////////////////////////////////1631 1632 // Under development!!!1633 ideal sca_bba (const ideal F, const ideal Q, const intvec *w, const intvec * /*hilb*/, kStrategy strat)1634 {1635 /*1636 #if MYTEST1637 PrintS("\n\n<sca_bba>\n\n");1638 #endif1639 1640 assume(rIsSCA(currRing));1641 1642 #ifndef NDEBUG1643 idTest(F);1644 idTest(Q);1645 #endif1646 1647 #if MYTEST1648 PrintS("\ncurrRing: \n");1649 rWrite(currRing);1650 #ifdef RDEBUG1651 // rDebugPrint(currRing);1652 #endif1653 1654 PrintS("\n\nF: \n");1655 idPrint(F);1656 PrintS("\n\nQ: \n");1657 idPrint(Q);1658 1659 PrintLn();1660 #endif1661 1662 1663 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);1664 const unsigned int m_iLastAltVar = scaLastAltVar(currRing);1665 1666 ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);1667 1668 ideal tempQ = Q;1669 1670 if(Q == currQuotient)1671 tempQ = SCAQuotient(currRing);1672 1673 // Q or tempQ will not be used below :(((1674 1675 1676 #if MYTEST1677 1678 PrintS("tempF: \n");1679 idPrint(tempF);1680 PrintS("tempQ: \n");1681 idPrint(tempQ);1682 #endif1683 1684 strat->z2homog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!1685 // redo no_prod_crit:1686 const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit1687 strat->no_prod_crit = ! bIsSCA;1688 1689 // strat->homog = strat->homog && strat->z2homog; // ?1690 1691 1692 1693 #ifdef KDEBUG1694 om_Opts.MinTrack = 5;1695 #endif1696 1697 int srmax, lrmax, red_result = 1;1698 int olddeg, reduc;1699 1700 // int hilbeledeg = 1, minimcnt = 0;1701 int hilbcount = 0;1702 1703 BOOLEAN withT = FALSE;1704 1705 initBuchMoraCrit(strat); // sets Gebauer, honey, sugarCrit // sca - ok???1706 initBuchMoraPos(strat); // sets strat->posInL, strat->posInT // check!! (Plural's: )1707 1708 // initHilbCrit(F, Q, &hilb, strat);1709 1710 // nc_gr_initBba(F,strat);1711 initBba(tempF, strat); // set enterS, red, initEcart, initEcartPair1712 1713 // set enterS, spSpolyShort, reduce, red, initEcart, initEcartPair1714 // ?? set spSpolyShort, reduce ???1715 initBuchMora(tempF, tempQ, strat); // tempQ = Q without squares!!!1716 1717 // if (strat->minim>0) strat->M = idInit(IDELEMS(F),F->rank);1718 1719 srmax = strat->sl;1720 reduc = olddeg = lrmax = 0;1721 1722 #define NO_BUCKETS1723 1724 #ifndef NO_BUCKETS1725 if (!TEST_OPT_NOT_BUCKETS)1726 strat->use_buckets = 1;1727 #endif1728 1729 // redtailBBa against T for inhomogenous input1730 if (!TEST_OPT_OLDSTD)1731 withT = ! strat->homog;1732 1733 // strat->posInT = posInT_pLength;1734 kTest_TS(strat);1735 1736 #undef HAVE_TAIL_RING1737 1738 #ifdef HAVE_TAIL_RING1739 if(!idIs0(F) &&(!rField_is_Ring())) // create strong gcd poly computes with tailring and S[i] ->to be fixed1740 kStratInitChangeTailRing(strat);1741 #endif1742 if (BVERBOSE(23))1743 {1744 if (test_PosInT!=NULL) strat->posInT=test_PosInT;1745 if (test_PosInL!=NULL) strat->posInL=test_PosInL;1746 kDebugPrint(strat);1747 }1748 1749 1750 ///////////////////////////////////////////////////////////////1751 // SCA:1752 1753 // due to std( SB, p).1754 // Note that after initBuchMora :: initSSpecial all these additional1755 // elements are in S and T (and some pairs are in L, which also has no initiall1756 // elements!!!)1757 if(TEST_OPT_SB_1)1758 {1759 // For all additional elements...1760 for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)1761 {1762 const poly pSave = tempF->m[iNewElement];1763 1764 if( pSave != NULL )1765 {1766 // tempF->m[iNewElement] = NULL;1767 1768 const poly p_next = pNext(pSave);1769 1770 if(p_next != NULL)1771 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )1772 if( p_GetExp(pSave, i, currRing) != 0 )1773 {1774 assume(p_GetExp(pSave, i, currRing) == 1);1775 1776 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);1777 1778 #ifdef PDEBUG1779 p_Test(p_new, currRing);1780 #endif1781 1782 if( p_new == NULL) continue;1783 1784 LObject h(p_new); // h = x_i * strat->P1785 h.is_special = TRUE;1786 1787 if (TEST_OPT_INTSTRATEGY)1788 h.pCleardenom(); // also does a p_Content1789 else1790 h.pNorm();1791 1792 strat->initEcart(&h);1793 h.sev = pGetShortExpVector(h.p);1794 1795 int pos = 0;1796 1797 if (strat->Ll != -1)1798 pos = strat->posInL(strat->L,strat->Ll,&h,strat);1799 1800 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);1801 }1802 }1803 }1804 }1805 1806 // compute-------------------------------------------------------1807 while (strat->Ll >= 0)1808 {1809 if (strat->Ll > lrmax) lrmax =strat->Ll;// stat.1810 1811 #ifdef KDEBUG1812 // loop_count++;1813 if (TEST_OPT_DEBUG) messageSets(strat);1814 #endif1815 1816 if (strat->Ll== 0) strat->interpt=TRUE;1817 1818 if (TEST_OPT_DEGBOUND1819 && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))1820 || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))1821 {1822 1823 #ifdef KDEBUG1824 // if (TEST_OPT_DEBUG){PrintS("^^^^?");}1825 #endif1826 1827 // *stops computation if1828 // * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then1829 // *a predefined number Kstd1_deg1830 while ((strat->Ll >= 0)1831 && ( (strat->homog==isHomog) || strat->L[strat->Ll].is_special || ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)) )1832 && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))1833 || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)))1834 )1835 {1836 #ifdef KDEBUG1837 // if (TEST_OPT_DEBUG){PrintS("^^^^^^^^^^^^!!!!");}1838 #endif1839 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);1840 // if (TEST_OPT_PROT) PrintS("^!");1841 }1842 if (strat->Ll<0) break;1843 else strat->noClearS=TRUE;1844 }1845 1846 // picks the last element from the lazyset L1847 strat->P = strat->L[strat->Ll];1848 strat->Ll--;1849 1850 1851 // assume(pNext(strat->P.p) != strat->tail);1852 1853 if(strat->P.IsNull()) continue;1854 1855 if (pNext(strat->P.p) == strat->tail)1856 {1857 // deletes the short spoly1858 pLmFree(strat->P.p);1859 1860 strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);1861 if (strat->P.p!=NULL) strat->initEcart(&strat->P);1862 }// else1863 1864 1865 if(strat->P.IsNull()) continue;1866 1867 if (strat->P.p1 == NULL)1868 {1869 // if (strat->minim > 0)1870 // strat->P.p2=p_Copy(strat->P.p, currRing, strat->tailRing);1871 1872 1873 // for input polys, prepare reduction1874 strat->P.PrepareRed(strat->use_buckets);1875 }1876 1877 if (TEST_OPT_PROT)1878 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),1879 &olddeg,&reduc,strat, red_result);1880 1881 // reduction of the element choosen from L1882 red_result = strat->red(&strat->P,strat);1883 1884 1885 // reduction to non-zero new poly1886 if (red_result == 1)1887 {1888 // statistic1889 if (TEST_OPT_PROT) PrintS("s");1890 1891 // get the polynomial (canonicalize bucket, make sure P.p is set)1892 strat->P.GetP(strat->lmBin);1893 1894 int pos = posInS(strat,strat->sl,strat->P.p,strat->P.ecart);1895 1896 // reduce the tail and normalize poly1897 if (TEST_OPT_INTSTRATEGY)1898 {1899 strat->P.pCleardenom();1900 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))1901 {1902 strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT); // !!!1903 strat->P.pCleardenom();1904 }1905 }1906 else1907 {1908 strat->P.pNorm();1909 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))1910 strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT);1911 }1912 strat->P.is_normalized=nIsOne(pGetCoeff(strat->P.p));1913 1914 #ifdef KDEBUG1915 if (TEST_OPT_DEBUG){PrintS(" ns:");p_wrp(strat->P.p,currRing);PrintLn();}1916 #endif1917 1918 // // min_std stuff1919 // if ((strat->P.p1==NULL) && (strat->minim>0))1920 // {1921 // if (strat->minim==1)1922 // {1923 // strat->M->m[minimcnt]=p_Copy(strat->P.p,currRing,strat->tailRing);1924 // p_Delete(&strat->P.p2, currRing, strat->tailRing);1925 // }1926 // else1927 // {1928 // strat->M->m[minimcnt]=strat->P.p2;1929 // strat->P.p2=NULL;1930 // }1931 // if (strat->tailRing!=currRing && pNext(strat->M->m[minimcnt])!=NULL)1932 // pNext(strat->M->m[minimcnt])1933 // = strat->p_shallow_copy_delete(pNext(strat->M->m[minimcnt]),1934 // strat->tailRing, currRing,1935 // currRing->PolyBin);1936 // minimcnt++;1937 // }1938 1939 // enter into S, L, and T1940 //if(withT)1941 enterT(strat->P, strat);1942 1943 // L1944 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);1945 1946 // posInS only depends on the leading term1947 strat->enterS(strat->P, pos, strat, strat->tl);1948 1949 // if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);1950 1951 // Print("[%d]",hilbeledeg);1952 if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);1953 1954 if (strat->sl>srmax) srmax = strat->sl;1955 1956 // //////////////////////////////////////////////////////////1957 // SCA:1958 const poly pSave = strat->P.p;1959 const poly p_next = pNext(pSave);1960 1961 // if(0)1962 if( p_next != NULL )1963 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )1964 if( p_GetExp(pSave, i, currRing) != 0 )1965 {1966 assume(p_GetExp(pSave, i, currRing) == 1);1967 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);1968 1969 #ifdef PDEBUG1970 p_Test(p_new, currRing);1971 #endif1972 1973 if( p_new == NULL) continue;1974 1975 LObject h(p_new); // h = x_i * strat->P1976 1977 h.is_special = TRUE;1978 1979 if (TEST_OPT_INTSTRATEGY)1980 {1981 // p_Content(h.p);1982 h.pCleardenom(); // also does a p_Content1983 }1984 else1985 {1986 h.pNorm();1987 }1988 1989 strat->initEcart(&h);1990 h.sev = pGetShortExpVector(h.p);1991 1992 int pos = 0;1993 1994 if (strat->Ll != -1)1995 pos = strat->posInL(strat->L,strat->Ll,&h,strat);1996 1997 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);1998 1999 2000 2001 2002 #if 02003 h.sev = pGetShortExpVector(h.p);2004 strat->initEcart(&h);2005 2006 h.PrepareRed(strat->use_buckets);2007 2008 // reduction of the element choosen from L(?)2009 red_result = strat->red(&h,strat);2010 2011 // reduction to non-zero new poly2012 if (red_result != 1) continue;2013 2014 2015 int pos = posInS(strat,strat->sl,h.p,h.ecart);2016 2017 // reduce the tail and normalize poly2018 if (TEST_OPT_INTSTRATEGY)2019 {2020 h.pCleardenom();2021 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))2022 {2023 h.p = redtailBba(&(h),pos-1,strat, withT); // !!!2024 h.pCleardenom();2025 }2026 }2027 else2028 {2029 h.pNorm();2030 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))2031 h.p = redtailBba(&(h),pos-1,strat, withT);2032 }2033 2034 #ifdef KDEBUG2035 if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}2036 #endif2037 2038 // h.PrepareRed(strat->use_buckets); // ???2039 2040 h.sev = pGetShortExpVector(h.p);2041 strat->initEcart(&h);2042 2043 if (strat->Ll==-1)2044 pos = 0;2045 else2046 pos = strat->posInL(strat->L,strat->Ll,&h,strat);2047 2048 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);2049 // the end of "#if 0" (comment)2050 #endif2051 2052 } // for all x_i \in Ann(lm(P))2053 } // if red(P) != NULL2054 2055 // else if (strat->P.p1 == NULL && strat->minim > 0)2056 // {2057 // p_Delete(&strat->P.p2, currRing, strat->tailRing);2058 // }2059 2060 #ifdef KDEBUG2061 // memset(&(strat->P), 0, sizeof(strat->P));2062 #endif2063 2064 kTest_TS(strat); // even of T is not used!2065 2066 // Print("\n$\n");2067 2068 }2069 2070 #ifdef KDEBUG2071 if (TEST_OPT_DEBUG) messageSets(strat);2072 #endif2073 2074 // complete reduction of the standard basis---------2075 2076 if (TEST_OPT_REDSB)2077 {2078 completeReduce(strat);2079 }2080 2081 //release temp data--------------------------------2082 2083 exitBuchMora(strat); // cleanT!2084 2085 id_Delete(&tempF, currRing);2086 2087 if (TEST_OPT_WEIGHTM)2088 {2089 pRestoreDegProcs(pFDegOld, pLDegOld);2090 if (ecartWeights)2091 {2092 omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short));2093 ecartWeights=NULL;2094 }2095 }2096 2097 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat);2098 2099 2100 2101 if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);2102 2103 2104 if (TEST_OPT_REDSB) // ???2105 {2106 // must be at the very end (after exitBuchMora) as it changes the S set!!!2107 ideal I = strat->Shdl;2108 ideal erg = kInterRedOld(I,tempQ);2109 assume(I!=erg);2110 id_Delete(&I, currRing);2111 strat->Shdl = erg;2112 }2113 2114 #if MYTEST2115 PrintS("\n\n</sca_bba>\n\n");2116 #endif2117 2118 return (strat->Shdl);2119 */2120 }2121 2122 // //////////////////////////////////////////////////////////////////////////////2123 // sca mora...2124 2125 /*2126 // returns TRUE if mora should use buckets, false otherwise2127 static BOOLEAN kMoraUseBucket(kStrategy strat)2128 {2129 #ifdef MORA_USE_BUCKETS2130 if (TEST_OPT_NOT_BUCKETS)2131 return FALSE;2132 if (strat->red == redFirst)2133 {2134 #ifdef NO_LDEG2135 if (!strat->syzComp)2136 return TRUE;2137 #else2138 if ((strat->homog || strat->honey) && !strat->syzComp)2139 return TRUE;2140 #endif2141 }2142 else2143 {2144 assume(strat->red == redEcart);2145 if (strat->honey && !strat->syzComp)2146 return TRUE;2147 }2148 #endif2149 return FALSE;2150 }2151 */2152 2153 #ifdef HAVE_ASSUME2154 static int sca_mora_count = 0;2155 static int sca_mora_loop_count;2156 #endif2157 2158 // ideal sca_mora (ideal F, ideal Q, intvec *w, intvec *, kStrategy strat)2159 ideal sca_mora(const ideal F, const ideal Q, const intvec *w, const intvec *, kStrategy strat, const ring _currRing)2160 {2161 /*2162 assume(rIsSCA(currRing));2163 2164 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);2165 const unsigned int m_iLastAltVar = scaLastAltVar(currRing);2166 2167 ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);2168 2169 ideal tempQ = Q;2170 2171 if(Q == currQuotient)2172 tempQ = SCAQuotient(currRing);2173 2174 bool bIdHomog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!2175 2176 assume( !bIdHomog || strat->homog ); // bIdHomog =====[implies]>>>>> strat->homog2177 2178 strat->homog = strat->homog && bIdHomog;2179 2180 #ifdef PDEBUG2181 assume( strat->homog == bIdHomog );2182 #endif2183 2184 #ifdef HAVE_ASSUME2185 sca_mora_count++;2186 sca_mora_loop_count = 0;2187 #endif2188 2189 #ifdef KDEBUG2190 om_Opts.MinTrack = 5;2191 #endif2192 2193 2194 strat->update = TRUE;2195 //- setting global variables ------------------- -2196 initBuchMoraCrit(strat);2197 // initHilbCrit(F,NULL,&hilb,strat); // no Q!2198 initMora(tempF, strat);2199 initBuchMoraPos(strat);2200 //Shdl=2201 initBuchMora(tempF, tempQ, strat); // temp Q, F!2202 // if (TEST_OPT_FASTHC) missingAxis(&strat->lastAxis,strat);2203 // updateS in initBuchMora has Hecketest2204 // * and could have put strat->kHEdgdeFound FALSE2205 #if 02206 if (ppNoether!=NULL)2207 {2208 strat->kHEdgeFound = TRUE;2209 }2210 if (strat->kHEdgeFound && strat->update)2211 {2212 firstUpdate(strat);2213 updateLHC(strat);2214 reorderL(strat);2215 }2216 if (TEST_OPT_FASTHC && (strat->lastAxis) && strat->posInLOldFlag)2217 {2218 strat->posInLOld = strat->posInL;2219 strat->posInLOldFlag = FALSE;2220 strat->posInL = posInL10;2221 updateL(strat);2222 reorderL(strat);2223 }2224 #endif2225 strat->use_buckets = kMoraUseBucket(strat);2226 2227 kTest_TS(strat);2228 2229 2230 int srmax = strat->sl;2231 int lrmax = strat->Ll;2232 int olddeg = 0;2233 int reduc = 0;2234 int red_result = 1;2235 // int hilbeledeg=1;2236 int hilbcount=0;2237 2238 2239 //- compute-------------------------------------------2240 2241 #undef HAVE_TAIL_RING2242 2243 #ifdef HAVE_TAIL_RING2244 // if (strat->homog && strat->red == redFirst)2245 // kStratInitChangeTailRing(strat);2246 #endif2247 2248 2249 2250 2251 2252 // due to std( SB, p)2253 if(TEST_OPT_SB_1)2254 {2255 for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)2256 {2257 2258 const poly pSave = tempF->m[iNewElement];2259 2260 if( pSave != NULL )2261 {2262 // tempF->m[iNewElement] = NULL;2263 2264 const poly p_next = pNext(pSave);2265 2266 if(p_next != NULL)2267 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )2268 if( p_GetExp(pSave, i, currRing) != 0 )2269 {2270 2271 assume(p_GetExp(pSave, i, currRing) == 1);2272 2273 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);2274 2275 #ifdef PDEBUG2276 p_Test(p_new, currRing);2277 #endif2278 2279 if( p_new == NULL) continue;2280 2281 LObject h(p_new); // h = x_i * strat->P2282 2283 if (TEST_OPT_INTSTRATEGY)2284 h.pCleardenom(); // also does a p_Content2285 else2286 h.pNorm();2287 2288 strat->initEcart(&h);2289 h.sev = pGetShortExpVector(h.p);2290 2291 int pos = 0;2292 2293 if (strat->Ll != -1)2294 pos = strat->posInL(strat->L,strat->Ll,&h,strat);2295 2296 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);2297 2298 if (strat->Ll>lrmax) lrmax = strat->Ll;2299 }2300 }2301 2302 }2303 }2304 2305 2306 2307 2308 while (strat->Ll >= 0)2309 {2310 #ifdef HAVE_ASSUME2311 sca_mora_loop_count++;2312 #endif2313 if (lrmax< strat->Ll) lrmax=strat->Ll; // stat2314 //test_int_std(strat->kIdeal);2315 #ifdef KDEBUG2316 if (TEST_OPT_DEBUG) messageSets(strat);2317 #endif2318 if (TEST_OPT_DEGBOUND2319 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))2320 {2321 // * stops computation if2322 // * - 24 (degBound)2323 // * && upper degree is bigger than Kstd1_deg2324 while ((strat->Ll >= 0)2325 && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)2326 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)2327 )2328 {2329 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);2330 //if (TEST_OPT_PROT)2331 //{2332 // PrintS("D"); mflush();2333 //}2334 }2335 if (strat->Ll<0) break;2336 else strat->noClearS=TRUE;2337 }2338 strat->P = strat->L[strat->Ll];// - picks the last element from the lazyset L -2339 if (strat->Ll==0) strat->interpt=TRUE;2340 strat->Ll--;2341 2342 // create the real Spoly2343 // assume(pNext(strat->P.p) != strat->tail);2344 2345 if(strat->P.IsNull()) continue;2346 2347 2348 if( pNext(strat->P.p) == strat->tail )2349 {2350 // deletes the int spoly and computes SPoly2351 pLmFree(strat->P.p); // ???2352 strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);2353 }2354 2355 2356 2357 if (strat->P.p1 == NULL)2358 {2359 // for input polys, prepare reduction (buckets !)2360 strat->P.SetLength(strat->length_pLength);2361 strat->P.PrepareRed(strat->use_buckets);2362 }2363 2364 if (!strat->P.IsNull())2365 {2366 // might be NULL from noether !!!2367 if (TEST_OPT_PROT)2368 message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);2369 // reduce2370 red_result = strat->red(&strat->P,strat);2371 }2372 2373 if (! strat->P.IsNull())2374 {2375 strat->P.GetP();2376 // statistics2377 if (TEST_OPT_PROT) PrintS("s");2378 // normalization2379 if (!TEST_OPT_INTSTRATEGY)2380 strat->P.pNorm();2381 // tailreduction2382 strat->P.p = redtail(&(strat->P),strat->sl,strat);2383 // set ecart -- might have changed because of tail reductions2384 if ((!strat->noTailReduction) && (!strat->honey))2385 strat->initEcart(&strat->P);2386 // cancel unit2387 cancelunit(&strat->P);2388 // for char 0, clear denominators2389 if (TEST_OPT_INTSTRATEGY)2390 strat->P.pCleardenom();2391 2392 // put in T2393 enterT(strat->P,strat);2394 // build new pairs2395 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);2396 // put in S2397 strat->enterS(strat->P,2398 posInS(strat,strat->sl,strat->P.p, strat->P.ecart),2399 strat, strat->tl);2400 2401 2402 // clear strat->P2403 if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);2404 strat->P.lcm=NULL;2405 2406 if (strat->sl>srmax) srmax = strat->sl; // stat.2407 if (strat->Ll>lrmax) lrmax = strat->Ll;2408 2409 2410 2411 // //////////////////////////////////////////////////////////2412 // SCA:2413 const poly pSave = strat->P.p;2414 const poly p_next = pNext(pSave);2415 2416 if(p_next != NULL)2417 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )2418 if( p_GetExp(pSave, i, currRing) != 0 )2419 {2420 2421 assume(p_GetExp(pSave, i, currRing) == 1);2422 2423 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);2424 2425 #ifdef PDEBUG2426 p_Test(p_new, currRing);2427 #endif2428 2429 if( p_new == NULL) continue;2430 2431 LObject h(p_new); // h = x_i * strat->P2432 2433 if (TEST_OPT_INTSTRATEGY)2434 h.pCleardenom(); // also does a p_Content2435 else2436 h.pNorm();2437 2438 strat->initEcart(&h);2439 h.sev = pGetShortExpVector(h.p);2440 2441 int pos = 0;2442 2443 if (strat->Ll != -1)2444 pos = strat->posInL(strat->L,strat->Ll,&h,strat);2445 2446 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);2447 2448 if (strat->Ll>lrmax) lrmax = strat->Ll;2449 }2450 2451 #ifdef KDEBUG2452 // make sure kTest_TS does not complain about strat->P2453 memset(&strat->P,0,sizeof(strat->P));2454 #endif2455 }2456 #if 02457 if (strat->kHEdgeFound)2458 {2459 if ((TEST_OPT_FINDET)2460 || ((TEST_OPT_MULTBOUND) && (scMult0Int((strat->Shdl)) < mu)))2461 {2462 // obachman: is this still used ???2463 // * stops computation if strat->kHEdgeFound and2464 // * - 27 (finiteDeterminacyTest)2465 // * or2466 // * - 232467 // * (multBound)2468 // * && multiplicity of the ideal is smaller then a predefined number mu2469 while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);2470 }2471 }2472 #endif2473 kTest_TS(strat);2474 }2475 // - complete reduction of the standard basis------------------------ -2476 if (TEST_OPT_REDSB) completeReduce(strat);2477 // - release temp data------------------------------- -2478 exitBuchMora(strat);2479 // - polynomials used for HECKE: HC, noether -2480 if (TEST_OPT_FINDET)2481 {2482 if (strat->kHEdge!=NULL)2483 Kstd1_mu=pFDeg(strat->kHEdge,currRing);2484 else2485 Kstd1_mu=-1;2486 }2487 pDelete(&strat->kHEdge);2488 strat->update = TRUE; //???2489 strat->lastAxis = 0; //???2490 pDelete(&strat->kNoether);2491 omFreeSize((ADDRESS)strat->NotUsedAxis,(pVariables+1)*sizeof(BOOLEAN));2492 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat);2493 if (TEST_OPT_WEIGHTM)2494 {2495 pRestoreDegProcs(pFDegOld, pLDegOld);2496 if (ecartWeights)2497 {2498 omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short));2499 ecartWeights=NULL;2500 }2501 }2502 if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);2503 idTest(strat->Shdl);2504 2505 id_Delete( &tempF, currRing);2506 2507 return (strat->Shdl);2508 */2509 }2510 2511 2512 2513 2514 2515 2516 1251 void sca_p_ProcsSet(ring rGR, p_Procs_s* p_Procs) 2517 1252 { … … 2528 1263 rGR->GetNC()->p_Procs.mm_Mult_pp = sca_mm_Mult_pp; 2529 1264 2530 2531 if (rHasLocalOrMixedOrdering(rGR))2532 {2533 #ifdef PDEBUG2534 // Print("Local case => GB == mora!\n");2535 #endif2536 rGR->GetNC()->p_Procs.GB = NULL; // sca_mora; // local ordering => Mora, otherwise - Buchberger!2537 }2538 else2539 {2540 #ifdef PDEBUG2541 // Print("Global case => GB == bba!\n");2542 #endif2543 rGR->GetNC()->p_Procs.GB = NULL; // sca_bba; // sca_gr_bba; // sca_bba? // sca_bba;2544 }2545 2546 2547 // rGR->GetNC()->p_Procs.GlobalGB = sca_gr_bba;2548 // rGR->GetNC()->p_Procs.LocalGB = sca_mora;2549 2550 2551 1265 // rGR->GetNC()->p_Procs.SPoly = sca_SPoly; 2552 1266 // rGR->GetNC()->p_Procs.ReduceSPoly = sca_ReduceSpoly; … … 2565 1279 r->GetNC()->mmMultPP() = sca_mm_Mult_pp; 2566 1280 2567 r->GetNC()->GB() = sca_gr_bba;2568 1281 /* 2569 1282 // ??????????????????????????????????????? coefficients swell... … … 2573 1286 // r->GetNC()->BucketPolyRed() = gnc_kBucketPolyRed; 2574 1287 // r->GetNC()->BucketPolyRed_Z()= gnc_kBucketPolyRed_Z; 2575 2576 1288 #endif 2577 1289 }
Note: See TracChangeset
for help on using the changeset viewer.