Changeset c8bd75 in git
- Timestamp:
- Apr 23, 1998, 11:52:15 AM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d6fc3c5cb4a5d2eed49001686d571df819c5496b
- Parents:
- 5079a04545e2a0f77d583f20b994866d68545a3b
- Location:
- Singular
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/clapconv.cc
r5079a04 rc8bd75 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapconv.cc,v 1.1 5 1998-03-16 14:56:25 obachmanExp $5 // $Id: clapconv.cc,v 1.16 1998-04-23 09:52:07 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: convert data between Singular and factory … … 301 301 int e, n = pVariables; 302 302 303 On(SW_RATIONAL); 303 304 while ( p!=NULL) 304 305 { -
Singular/clapsing.cc
r5079a04 rc8bd75 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1.3 0 1998-04-21 13:20:39Singular Exp $5 // $Id: clapsing.cc,v 1.31 1998-04-23 09:52:08 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 375 375 TIMING_START( contentTimer ); 376 376 #endif 377 while ( p&& (g != 1) )377 while ( (p != NULL) && (g != 1) ) 378 378 { 379 379 nTest(pGetCoeff(p)); … … 459 459 { 460 460 (*v)=new intvec(1); 461 (*v)[1]=1; 461 462 } 462 463 return res; -
Singular/kstd1.cc
r5079a04 rc8bd75 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd1.cc,v 1. 19 1998-04-07 17:54:20Singular Exp $ */4 /* $Id: kstd1.cc,v 1.20 1998-04-23 09:52:09 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 1644 1644 initBuchMoraPos(strat); 1645 1645 initMora(F,strat); 1646 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1646 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1647 1647 max(strat->ak,pMaxComp(q)), 1648 1648 strat->syzComp, FALSE); … … 1739 1739 strat->enterS = enterSMoraNF; 1740 1740 /*- set T -*/ 1741 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1741 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1742 1742 max(strat->ak,idRankFreeModule(q)), 1743 1743 strat->syzComp, FALSE); … … 1846 1846 ) 1847 1847 { 1848 if (strat->ak == 0) 1849 { 1850 h = (tHomog)idHomIdeal(F,Q); 1848 if (strat->ak == 0) 1849 { 1850 h = (tHomog)idHomIdeal(F,Q); 1851 1851 w=NULL; 1852 1852 } 1853 1853 else 1854 h = (tHomog)idHomModule(F,Q,w); 1855 //Print("test homog:%d\n",h); 1854 h = (tHomog)idHomModule(F,Q,w); 1855 //Print("test homog:%d\n",h); 1856 1856 //if ((h==isHomog)&&(w!=NULL)&&(*w!=NULL)) 1857 1857 //{ 1858 1858 // (*w)->show(); 1859 1859 // PrintLn(); 1860 // if (F!=NULL) jjPRINT_MA0(idModule2Matrix(idCopy(F)),sNoName); 1860 // if (F!=NULL) jjPRINT_MA0(idModule2Matrix(idCopy(F)),sNoName); 1861 1861 //} 1862 1862 } … … 1866 1866 if (h==isHomog) 1867 1867 { 1868 if ((w!=NULL) && (*w!=NULL)) 1868 if ((w!=NULL) && (*w!=NULL)) 1869 1869 { 1870 1870 kModW = *w; … … 1883 1883 { 1884 1884 if (w!=NULL) 1885 r=mora(F,Q,*w,hilb,strat); 1885 r=mora(F,Q,*w,hilb,strat); 1886 1886 else 1887 1887 r=mora(F,Q,NULL,hilb,strat); … … 2134 2134 l->m[1].data=(void *)idInit(1,F->rank); 2135 2135 Warn("no minimal generating set computed"); 2136 } 2136 } 2137 2137 else 2138 2138 { … … 2142 2142 Free((ADDRESS)strat,sizeof(skStrategy)); 2143 2143 if (reduced>2) 2144 { 2144 { 2145 2145 Kstd1_deg=Kstd1_OldDeg; 2146 2146 if (!oldDegBound) -
Singular/kstd2.cc
r5079a04 rc8bd75 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1.1 6 1998-04-07 17:55:10 Singular Exp $ */4 /* $Id: kstd2.cc,v 1.17 1998-04-23 09:52:10 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 1053 1053 /* compute------------------------------------------------------- */ 1054 1054 while ((stdTrace!=NULL && !stdTrace->CheckEnd(strat)) || (stdTrace == NULL && strat->Ll>=0)) 1055 1055 { 1056 1056 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1057 1058 1059 1060 1061 1057 if(stdTrace!=NULL && stdTrace->Receive) 1058 { 1059 stdTrace->ReceiveMsg(); 1060 stdTrace->ParseMessage(strat); 1061 } 1062 1062 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1063 if((stdTrace!=NULL && stdTrace->Verwaltung) || (stdTrace == NULL)) 1064 { 1065 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ 1066 #ifdef KDEBUG 1067 if (TEST_OPT_DEBUG) messageSets(strat); 1068 #endif 1069 //test_int_std(strat->kIdeal); 1070 if (strat->Ll== 0) strat->interpt=TRUE; 1071 if (TEST_OPT_DEGBOUND 1072 && ((strat->honey && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)>Kstd1_deg)) 1073 || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p)>Kstd1_deg)))) 1074 { 1075 /* 1076 *stops computation if 1077 * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then 1078 *a predefined number Kstd1_deg 1079 */ 1080 while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat); 1081 break; 1082 } 1083 } 1063 if((stdTrace!=NULL && stdTrace->Verwaltung) || (stdTrace == NULL)) 1064 { 1065 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ 1066 #ifdef KDEBUG 1067 if (TEST_OPT_DEBUG) messageSets(strat); 1068 #endif 1069 //test_int_std(strat->kIdeal); 1070 if (strat->Ll== 0) strat->interpt=TRUE; 1071 if (TEST_OPT_DEGBOUND 1072 && ((strat->honey 1073 && (strat->L[strat->Ll].ecart+pFDeg(strat->L[strat->Ll].p)>Kstd1_deg)) 1074 || ((!strat->honey) && (pFDeg(strat->L[strat->Ll].p)>Kstd1_deg)))) 1075 { 1076 /* 1077 *stops computation if 1078 * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then 1079 *a predefined number Kstd1_deg 1080 */ 1081 while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat); 1082 break; 1083 } 1084 } 1084 1085 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1085 if((stdTrace!=NULL && stdTrace->TupelL) || (stdTrace == NULL )) 1086 { 1087 /* picks the last element from the lazyset L */ 1088 strat->P = strat->L[strat->Ll]; 1089 anzTupel++; 1090 strat->Ll--; 1091 if(stdTrace!=NULL && stdTrace->TupelStore) 1086 if((stdTrace!=NULL && stdTrace->TupelL) || (stdTrace == NULL )) 1087 { 1088 /* picks the last element from the lazyset L */ 1089 strat->P = strat->L[strat->Ll]; 1090 anzTupel++; 1091 strat->Ll--; 1092 if(stdTrace!=NULL && stdTrace->TupelStore) 1093 { 1094 if (TEST_OPT_PROT) PrintS(":"); 1095 stdTrace->Store(strat->P); 1096 strat->P.p=NULL; 1097 anzSkipped++; 1098 } 1099 } 1100 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1101 if((stdTrace!=NULL && stdTrace->SPoly) || (stdTrace == NULL)) 1102 { 1103 kTest(strat); 1104 if (pNext(strat->P.p) == strat->tail) 1105 { 1106 /* deletes the short spoly and computes */ 1107 pFree1(strat->P.p); 1108 /* the real one */ 1109 strat->P.p = spSpolyCreate(strat->P.p1,strat->P.p2,strat->kNoether); 1110 } 1111 if((strat->P.p1==NULL) && (strat->minim>0)) 1112 strat->P.p2=pCopy(strat->P.p); 1113 } 1114 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1115 if((stdTrace!=NULL && stdTrace->Reduzieren) || (stdTrace == NULL)) 1116 { 1117 #ifdef SDRING 1118 if (strat->P.p != NULL) 1119 #endif 1120 { 1121 if (strat->honey) 1122 { 1123 if (TEST_OPT_PROT) 1124 message(strat->P.ecart+pFDeg(strat->P.p),&olddeg,&reduc,strat); 1125 } 1126 else 1127 { 1128 if (TEST_OPT_PROT) 1129 message(pFDeg(strat->P.p),&olddeg,&reduc,strat); 1130 } 1131 /* reduction of the element choosen from L */ 1132 oldLl=strat->Ll; 1133 strat->red(&strat->P,strat); 1134 if(stdTrace!=NULL && stdTrace->TupelPosition) 1135 stdTrace->CheckPosition(strat,oldLl); 1136 if((stdTrace!=NULL && stdTrace->TupelMelden)) 1137 stdTrace->SendTupel(strat); 1138 if(stdTrace!=NULL && strat->P.p!=NULL && stdTrace->Modus==ModCheck) 1139 anzNew++; 1140 } 1141 if (strat->P.p != NULL) 1142 { 1143 #ifdef SDRING 1144 aug[0]=strat->P.p; 1145 augl=0; 1146 if (pSDRING) 1147 { 1148 oldLcm=strat->P.lcm; 1149 #ifdef SRING 1150 if (pSRING) psAug(pCopy(strat->P.p),pOne(),&aug,&augl,&augmax); 1151 #endif 1152 #ifdef DRING 1153 if (pDRING) pdAug(pCopy(strat->P.p),&aug,&augl,&augmax); 1154 #endif 1155 #ifdef KDEBUG 1156 if (TEST_OPT_DEBUG) 1157 { 1158 PrintS(" aug of "); 1159 wrp(aug[0]); 1160 PrintLn(); 1161 int iiaug=augl; 1162 while (iiaug>=0) 1092 1163 { 1093 if (TEST_OPT_PROT) PrintS(":");1094 stdTrace->Store(strat->P);1095 strat->P.p=NULL;1096 anzSkipped++;1164 Print(" to %d:",iiaug); 1165 wrp(aug[iiaug]); 1166 PrintLn(); 1167 iiaug--; 1097 1168 } 1098 } 1099 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1100 if((stdTrace!=NULL && stdTrace->SPoly) || (stdTrace == NULL)) 1101 { 1102 kTest(strat); 1103 if (pNext(strat->P.p) == strat->tail) 1104 { 1105 /* deletes the short spoly and computes */ 1106 pFree1(strat->P.p); 1107 /* the real one */ 1108 strat->P.p = spSpolyCreate(strat->P.p1,strat->P.p2,strat->kNoether); 1109 } 1110 if((strat->P.p1==NULL) && (strat->minim>0)) 1111 strat->P.p2=pCopy(strat->P.p); 1112 } 1113 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1114 if((stdTrace!=NULL && stdTrace->Reduzieren) || (stdTrace == NULL)) 1115 { 1169 } 1170 #endif 1171 } 1172 for (augl++;augl != 0;) 1173 { 1174 strat->P.p=aug[--augl]; 1175 aug[augl]=NULL; 1176 if (pSDRING) 1177 { 1178 if (oldLcm==NULL) strat->P.lcm=NULL; 1179 else strat->P.lcm=pCopy1(oldLcm); 1180 } 1181 if ((augl!=0)&&(strat->P.p!=NULL)) 1182 strat->red(&strat->P,strat); 1183 if (strat->P.p != NULL) 1184 { 1185 #endif 1186 /* statistic */ 1187 if (TEST_OPT_PROT) PrintS("s"); 1188 /* enter P.p into s and L */ 1189 { 1190 int pos=posInS(strat->S,strat->sl,strat->P.p); 1116 1191 #ifdef SDRING 1117 if (strat->P.p != NULL) 1118 #endif 1119 { 1120 if (strat->honey) 1121 { 1122 if (TEST_OPT_PROT) message(strat->P.ecart+pFDeg(strat->P.p),&olddeg,&reduc,strat); 1123 } 1124 else 1125 { 1126 if (TEST_OPT_PROT) message(pFDeg(strat->P.p),&olddeg,&reduc,strat); 1127 } 1128 /* reduction of the element choosen from L */ 1129 oldLl=strat->Ll; 1130 strat->red(&strat->P,strat); 1131 if(stdTrace!=NULL && stdTrace->TupelPosition) 1132 stdTrace->CheckPosition(strat,oldLl); 1133 if((stdTrace!=NULL && stdTrace->TupelMelden)) 1134 stdTrace->SendTupel(strat); 1135 if(stdTrace!=NULL && strat->P.p!=NULL && stdTrace->Modus==ModCheck) 1136 anzNew++; 1137 } 1138 if (strat->P.p != NULL) 1139 { 1140 #ifdef SDRING 1141 aug[0]=strat->P.p; 1142 augl=0; 1143 if (pSDRING) 1144 { 1145 oldLcm=strat->P.lcm; 1146 #ifdef SRING 1147 if (pSRING) psAug(pCopy(strat->P.p),pOne(),&aug,&augl,&augmax); 1148 #endif 1149 #ifdef DRING 1150 if (pDRING) pdAug(pCopy(strat->P.p),&aug,&augl,&augmax); 1151 #endif 1152 #ifdef KDEBUG 1153 if (TEST_OPT_DEBUG) 1154 { 1155 PrintS(" aug of "); 1156 wrp(aug[0]); 1157 PrintLn(); 1158 int iiaug=augl; 1159 while (iiaug>=0) 1192 if ((pSDRING) 1193 && (pos<=strat->sl) 1194 && (pComparePolys(strat->P.p,strat->S[pos]))) 1160 1195 { 1161 Print(" to %d:",iiaug); 1162 wrp(aug[iiaug]); 1163 PrintLn(); 1164 iiaug--; 1196 if (TEST_OPT_PROT) 1197 PrintS("d"); 1198 } 1199 else 1200 #endif 1201 { 1202 if (TEST_OPT_INTSTRATEGY) 1203 { 1204 if ((!TEST_OPT_MINRES)||(strat->syzComp==0)||(!strat->homog)) 1205 { 1206 strat->P.p = redtailBba(strat->P.p,pos-1,strat); 1207 //if (strat->redTailChange) 1208 pCleardenom(strat->P.p); 1209 } 1210 } 1211 else 1212 { 1213 pNorm(strat->P.p); 1214 if ((!TEST_OPT_MINRES)||(strat->syzComp==0)||(!strat->homog)) 1215 { 1216 strat->P.p = redtailBba(strat->P.p,pos-1,strat); 1217 } 1218 } 1219 #ifdef KDEBUG 1220 if (TEST_OPT_DEBUG) 1221 { 1222 PrintS("new s:"); 1223 wrp(strat->P.p); 1224 PrintLn(); 1225 } 1226 #endif 1227 if((strat->P.p1==NULL) && (strat->minim>0)) 1228 { 1229 if (strat->minim==1) 1230 { 1231 strat->M->m[minimcnt]=pCopy(strat->P.p); 1232 pDelete(&strat->P.p2); 1233 } 1234 else 1235 { 1236 strat->M->m[minimcnt]=strat->P.p2; 1237 strat->P.p2=NULL; 1238 } 1239 minimcnt++; 1240 } 1241 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat); 1242 if (strat->sl==-1) pos=0; 1243 else pos=posInS(strat->S,strat->sl,strat->P.p); 1244 strat->enterS(strat->P,pos,strat); 1245 } 1246 if (hilb!=NULL) 1247 { // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1248 oldLl=strat->Ll; 1249 khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat); 1250 if(stdTrace!=NULL) 1251 stdTrace->CheckHilb(strat,oldLl); 1165 1252 } 1166 1253 } 1167 #endif 1168 } 1169 for (augl++;augl != 0;) 1170 { 1171 strat->P.p=aug[--augl]; 1172 aug[augl]=NULL; 1173 if (pSDRING) 1174 { 1175 if (oldLcm==NULL) strat->P.lcm=NULL; 1176 else strat->P.lcm=pCopy1(oldLcm); 1177 } 1178 if ((augl!=0)&&(strat->P.p!=NULL)) 1179 strat->red(&strat->P,strat); 1180 if (strat->P.p != NULL) 1181 { 1182 #endif 1183 /* statistic */ 1184 if (TEST_OPT_PROT) PrintS("s"); 1185 /* enter P.p into s and L */ 1186 { 1187 int pos=posInS(strat->S,strat->sl,strat->P.p); 1254 if (strat->P.lcm!=NULL) pFree1(strat->P.lcm); 1188 1255 #ifdef SDRING 1189 if ((pSDRING) && (pos<=strat->sl)&& (pComparePolys(strat->P.p,strat->S[pos]))) 1190 { 1191 if (TEST_OPT_PROT) 1192 PrintS("d"); 1193 } 1194 else 1195 #endif 1196 { 1197 if (TEST_OPT_INTSTRATEGY) 1198 { 1199 if ((!TEST_OPT_MINRES)||(strat->syzComp==0)||(!strat->homog)) 1200 { 1201 strat->P.p = redtailBba(strat->P.p,pos-1,strat); 1202 pCleardenom(strat->P.p); 1203 } 1204 } 1205 else 1206 { 1207 pNorm(strat->P.p); 1208 if ((!TEST_OPT_MINRES)||(strat->syzComp==0)||(!strat->homog)) 1209 { 1210 strat->P.p = redtailBba(strat->P.p,pos-1,strat); 1211 } 1212 } 1213 #ifdef KDEBUG 1214 if (TEST_OPT_DEBUG) 1215 { 1216 PrintS("new s:"); 1217 wrp(strat->P.p); 1218 PrintLn(); 1219 } 1220 #endif 1221 if((strat->P.p1==NULL) && (strat->minim>0)) 1222 { 1223 if (strat->minim==1) 1224 { 1225 strat->M->m[minimcnt]=pCopy(strat->P.p); 1226 pDelete(&strat->P.p2); 1227 } 1228 else 1229 { 1230 strat->M->m[minimcnt]=strat->P.p2; 1231 strat->P.p2=NULL; 1232 } 1233 minimcnt++; 1234 } 1235 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat); 1236 if (strat->sl==-1) pos=0; 1237 else pos=posInS(strat->S,strat->sl,strat->P.p); 1238 strat->enterS(strat->P,pos,strat); 1239 } 1240 if (hilb!=NULL) 1241 { // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1242 oldLl=strat->Ll; 1243 khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat); 1244 if(stdTrace!=NULL) 1245 stdTrace->CheckHilb(strat,oldLl); 1246 } 1247 } 1248 if (strat->P.lcm!=NULL) pFree1(strat->P.lcm); 1256 } 1257 } 1258 /* delete the old pair */ 1259 if (pSDRING &&(oldLcm!=NULL)) pFree1(oldLcm); 1260 #endif 1261 if (strat->sl>srmax) srmax = strat->sl; 1262 } 1263 if(stdTrace!=NULL && stdTrace->TupelTesten) 1264 stdTrace->TupelDifferent(strat); 1265 } 1266 #ifdef KDEBUG 1267 strat->P.lcm=NULL; 1268 #endif 1269 kTest(strat); 1270 } 1271 if(stdTrace !=NULL) 1272 { 1273 if(TEST_OPT_PROT) 1274 { 1275 Print("\n(Tupel Skipped New) = (%i %i %i)\n",anzTupel, anzSkipped, anzNew); 1276 } 1277 } 1278 if((stdTrace!=NULL && stdTrace->ResultSend) || (stdTrace == NULL)) 1279 { 1280 #ifdef KDEBUG 1281 if (TEST_OPT_DEBUG) messageSets(strat); 1282 #endif 1283 /* complete reduction of the standard basis--------- */ 1284 if (TEST_OPT_REDSB) completeReduce(strat); 1285 /* release temp data-------------------------------- */ 1286 exitBuchMora(strat); 1287 if (TEST_OPT_WEIGHTM) 1288 { 1289 pFDeg=pFDegOld; 1290 pLDeg=pLDegOld; 1291 if (ecartWeights) 1292 { 1293 Free((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short)); 1294 ecartWeights=NULL; 1295 } 1296 } 1249 1297 #ifdef SDRING 1250 } 1251 } 1252 /* delete the old pair */ 1253 if (pSDRING &&(oldLcm!=NULL)) pFree1(oldLcm); 1254 #endif 1255 if (strat->sl>srmax) srmax = strat->sl; 1256 } 1257 if(stdTrace!=NULL && stdTrace->TupelTesten) 1258 stdTrace->TupelDifferent(strat); 1259 } 1260 #ifdef KDEBUG 1261 strat->P.lcm=NULL; 1262 #endif 1263 kTest(strat); 1264 } 1265 if(stdTrace !=NULL) 1266 if(TEST_OPT_PROT) 1267 { 1268 Print("\n(Tupel Skipped New) = (%i %i %i)\n",anzTupel, anzSkipped, anzNew); 1269 } 1270 if((stdTrace!=NULL && stdTrace->ResultSend) || (stdTrace == NULL)) 1271 { 1272 #ifdef KDEBUG 1273 if (TEST_OPT_DEBUG) messageSets(strat); 1274 #endif 1275 /* complete reduction of the standard basis--------- */ 1276 if (TEST_OPT_REDSB) completeReduce(strat); 1277 /* release temp data-------------------------------- */ 1278 exitBuchMora(strat); 1279 if (TEST_OPT_WEIGHTM) 1280 { 1281 pFDeg=pFDegOld; 1282 pLDeg=pLDegOld; 1283 if (ecartWeights) 1284 { 1285 Free((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short)); 1286 ecartWeights=NULL; 1287 } 1288 } 1289 #ifdef SDRING 1290 Free((ADDRESS)aug,augmax*sizeof(poly)); 1291 #endif 1292 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat); 1293 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1294 } 1298 Free((ADDRESS)aug,augmax*sizeof(poly)); 1299 #endif 1300 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat); 1301 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1302 } 1295 1303 if(stdTrace!=NULL) 1296 1304 stdTrace->End(strat); … … 1449 1457 { 1450 1458 strat->P.p = redtailBba(strat->P.p,pos-1,strat); 1451 pCleardenom(strat->P.p); 1459 //if (strat->redTailChange) 1460 pCleardenom(strat->P.p); 1452 1461 } 1453 1462 } … … 1589 1598 /*- set S -*/ 1590 1599 strat->sl = -1; 1591 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1600 strat->spSpolyLoop = spGetSpolyLoop(currRing, 1592 1601 max(strat->ak, idRankFreeModule(q)), 1593 1602 strat->syzComp, FALSE); -
Singular/kutil.cc
r5079a04 rc8bd75 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.1 7 1998-04-22 07:49:01 Singular Exp $ */4 /* $Id: kutil.cc,v 1.18 1998-04-23 09:52:11 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for std … … 458 458 { 459 459 if (i < 0) 460 461 462 463 464 465 466 467 468 460 { 461 //if (strat->next!=NULL) 462 //{ 463 // strat=strat->next; 464 // i=strat->tl; 465 //} 466 //else 467 { 468 /* not found : */ 469 469 pDelete(&p); 470 471 472 473 474 470 break; 471 } 472 } 473 else 474 { 475 475 if (strat->T[i].p==p) 476 477 476 { 477 /* found : */ 478 478 p=NULL; 479 480 481 482 479 break; 480 } 481 i--; 482 } 483 483 } 484 484 } … … 3768 3768 if (TEST_OPT_INTSTRATEGY) 3769 3769 { 3770 pCleardenom(strat->S[i]); 3770 //if (strat->redTailChange) 3771 pCleardenom(strat->S[i]); 3771 3772 } 3772 3773 if (TEST_OPT_PROT) -
Singular/longalg.cc
r5079a04 rc8bd75 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1.2 3 1998-04-23 09:16:25 schmidtExp $ */4 /* $Id: longalg.cc,v 1.24 1998-04-23 09:52:14 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 965 965 return napCopy(b); 966 966 } 967 else 968 if ((b==NULL) 969 || ((b->ne==NULL)&&(nacIsZero(b->ko)))) 970 { 971 return napCopy(a); 972 } 967 973 if (naMinimalPoly != NULL) 968 974 { … … 977 983 y = a; 978 984 } 979 g = napGcd0(x, y); 985 if (!naIsChar0) g = napInit(1); 986 else g = napGcd0(x, y); 980 987 if (y->ne==NULL) 981 988 { … … 1008 1015 g=a; 1009 1016 h=b; 1010 x = napGcd0(g,h); 1017 if (!naIsChar0) x = napInit(1); 1018 else x = napGcd0(g,h); 1019 //int huhu=0; 1011 1020 for (i=(naNumbOfPar-1); i>=0; i--) 1021 { 1012 1022 x->e[i] = napExpi(i,a,b); 1023 //huhu+=x->e[i]; 1024 } 1025 //if (huhu!=0) 1026 //{ 1027 // Print("{%d}",huhu); 1028 //} 1013 1029 return x; 1014 1030 } … … 1796 1812 } 1797 1813 else 1798 result->z = napGcd 0(x->z, y->z);1814 result->z = napGcd(x->z, y->z); // change frpm napGcd0 1799 1815 naTest((number)result); 1800 1816 return (number)result; -
Singular/polys1.cc
r5079a04 rc8bd75 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1.1 1 1998-01-05 16:39:28Singular Exp $ */4 /* $Id: polys1.cc,v 1.12 1998-04-23 09:52:15 Singular Exp $ */ 5 5 6 6 /* … … 276 276 if (bNoAdd) 277 277 pSetm(p); 278 else 278 else 279 279 #endif 280 280 p->Order *= exp; … … 415 415 poly pPower(poly p, int i) 416 416 { 417 if (i==0) 418 return pOne(); 419 417 420 poly rc=NULL; 418 421 … … 731 734 pSetCoeff(p,nInit(1)); 732 735 } 733 #ifdef HAVE_FACTORY734 else if ( (nGetChar() == 1) || (nGetChar() < 0) )735 {736 pTest(ph);737 singclap_divide_content(ph);738 pTest(ph);739 }740 #endif741 736 else 742 737 { … … 753 748 nNormalize(pGetCoeff(p)); 754 749 d=nGcd(h,pGetCoeff(p)); 755 if(nIsOne(d))756 {757 nDelete(&h);758 nDelete(&d);759 return;760 }761 750 nDelete(&h); 762 751 h = d; 752 if(nIsOne(h)) 753 { 754 break; 755 } 763 756 pIter(p); 764 757 } 765 758 p = ph; 766 759 //number tmp; 767 while (p!=NULL) 768 { 769 //d = nDiv(pGetCoeff(p),h); 770 //tmp = nIntDiv(pGetCoeff(p),h); 771 //if (!nEqual(d,tmp)) 772 //{ 773 // StringSetS("** div0:");nWrite(pGetCoeff(p));StringAppendS("/"); 774 // nWrite(h);StringAppendS("=");nWrite(d);StringAppendS(" int:"); 775 // nWrite(tmp);Print(StringAppendS("\n")); 776 //} 777 //nDelete(&tmp); 778 d = nIntDiv(pGetCoeff(p),h); 779 pSetCoeff(p,d); 780 pIter(p); 760 if(!nIsOne(h)) 761 { 762 while (p!=NULL) 763 { 764 //d = nDiv(pGetCoeff(p),h); 765 //tmp = nIntDiv(pGetCoeff(p),h); 766 //if (!nEqual(d,tmp)) 767 //{ 768 // StringSetS("** div0:");nWrite(pGetCoeff(p));StringAppendS("/"); 769 // nWrite(h);StringAppendS("=");nWrite(d);StringAppendS(" int:"); 770 // nWrite(tmp);Print(StringAppendS("\n")); 771 //} 772 //nDelete(&tmp); 773 d = nIntDiv(pGetCoeff(p),h); 774 pSetCoeff(p,d); 775 pIter(p); 776 } 781 777 } 782 778 nDelete(&h); 779 #ifdef HAVE_FACTORY 780 if ( (nGetChar() == 1) || (nGetChar() < 0) ) /* Q[a],Q(a),Zp[a],Z/p(a) */ 781 { 782 pTest(ph); 783 singclap_divide_content(ph); 784 pTest(ph); 785 } 786 #endif 783 787 } 784 788 }
Note: See TracChangeset
for help on using the changeset viewer.