Changeset c8bd75 in git


Ignore:
Timestamp:
Apr 23, 1998, 11:52:15 AM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
d6fc3c5cb4a5d2eed49001686d571df819c5496b
Parents:
5079a04545e2a0f77d583f20b994866d68545a3b
Message:
 *hannes: minor fixes


git-svn-id: file:///usr/local/Singular/svn/trunk@1431 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/clapconv.cc

    r5079a04 rc8bd75  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapconv.cc,v 1.15 1998-03-16 14:56:25 obachman Exp $
     5// $Id: clapconv.cc,v 1.16 1998-04-23 09:52:07 Singular Exp $
    66/*
    77* ABSTRACT: convert data between Singular and factory
     
    301301  int e, n = pVariables;
    302302
     303  On(SW_RATIONAL);
    303304  while ( p!=NULL)
    304305  {
  • Singular/clapsing.cc

    r5079a04 rc8bd75  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapsing.cc,v 1.30 1998-04-21 13:20:39 Singular Exp $
     5// $Id: clapsing.cc,v 1.31 1998-04-23 09:52:08 Singular Exp $
    66/*
    77* ABSTRACT: interface between Singular and factory
     
    375375    TIMING_START( contentTimer );
    376376#endif
    377     while ( p && (g != 1) )
     377    while ( (p != NULL) && (g != 1) )
    378378    {
    379379      nTest(pGetCoeff(p));
     
    459459    {
    460460      (*v)=new intvec(1);
     461      (*v)[1]=1;
    461462    }
    462463    return res;
  • Singular/kstd1.cc

    r5079a04 rc8bd75  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.19 1998-04-07 17:54:20 Singular Exp $ */
     4/* $Id: kstd1.cc,v 1.20 1998-04-23 09:52:09 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    16441644  initBuchMoraPos(strat);
    16451645  initMora(F,strat);
    1646   strat->spSpolyLoop = spGetSpolyLoop(currRing, 
     1646  strat->spSpolyLoop = spGetSpolyLoop(currRing,
    16471647                                      max(strat->ak,pMaxComp(q)),
    16481648                                      strat->syzComp, FALSE);
     
    17391739  strat->enterS = enterSMoraNF;
    17401740  /*- set T -*/
    1741   strat->spSpolyLoop = spGetSpolyLoop(currRing, 
     1741  strat->spSpolyLoop = spGetSpolyLoop(currRing,
    17421742                                      max(strat->ak,idRankFreeModule(q)),
    17431743                                      strat->syzComp, FALSE);
     
    18461846  )
    18471847  {
    1848     if (strat->ak == 0)       
    1849     {
    1850       h = (tHomog)idHomIdeal(F,Q);   
     1848    if (strat->ak == 0)
     1849    {
     1850      h = (tHomog)idHomIdeal(F,Q);
    18511851      w=NULL;
    18521852    }
    18531853    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);
    18561856    //if ((h==isHomog)&&(w!=NULL)&&(*w!=NULL))
    18571857    //{
    18581858    //  (*w)->show();
    18591859    //  PrintLn();
    1860     //  if (F!=NULL) jjPRINT_MA0(idModule2Matrix(idCopy(F)),sNoName);   
     1860    //  if (F!=NULL) jjPRINT_MA0(idModule2Matrix(idCopy(F)),sNoName);
    18611861    //}
    18621862  }
     
    18661866  if (h==isHomog)
    18671867  {
    1868     if ((w!=NULL) && (*w!=NULL))     
     1868    if ((w!=NULL) && (*w!=NULL))
    18691869    {
    18701870      kModW = *w;
     
    18831883  {
    18841884    if (w!=NULL)
    1885       r=mora(F,Q,*w,hilb,strat);     
     1885      r=mora(F,Q,*w,hilb,strat);
    18861886    else
    18871887      r=mora(F,Q,NULL,hilb,strat);
     
    21342134    l->m[1].data=(void *)idInit(1,F->rank);
    21352135    Warn("no minimal generating set computed");
    2136   } 
     2136  }
    21372137  else
    21382138  {
     
    21422142  Free((ADDRESS)strat,sizeof(skStrategy));
    21432143  if (reduced>2)
    2144   { 
     2144  {
    21452145    Kstd1_deg=Kstd1_OldDeg;
    21462146    if (!oldDegBound)
  • Singular/kstd2.cc

    r5079a04 rc8bd75  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.16 1998-04-07 17:55:10 Singular Exp $ */
     4/* $Id: kstd2.cc,v 1.17 1998-04-23 09:52:10 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    10531053  /* compute------------------------------------------------------- */
    10541054  while ((stdTrace!=NULL && !stdTrace->CheckEnd(strat)) || (stdTrace == NULL && strat->Ll>=0))
    1055     {
     1055  {
    10561056//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1057       if(stdTrace!=NULL && stdTrace->Receive)
    1058         {
    1059           stdTrace->ReceiveMsg();
    1060           stdTrace->ParseMessage(strat);
    1061         }
     1057    if(stdTrace!=NULL && stdTrace->Receive)
     1058    {
     1059      stdTrace->ReceiveMsg();
     1060      stdTrace->ParseMessage(strat);
     1061    }
    10621062//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    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    }
    10841085//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    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)
    10921163            {
    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--;
    10971168            }
    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);
    11161191#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])))
    11601195              {
    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);
    11651252              }
    11661253            }
    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);
    11881255#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    }
    12491297#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  }
    12951303  if(stdTrace!=NULL)
    12961304    stdTrace->End(strat);
     
    14491457                {
    14501458                  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
    1451                   pCleardenom(strat->P.p);
     1459                  //if (strat->redTailChange)
     1460                    pCleardenom(strat->P.p);
    14521461                }
    14531462              }
     
    15891598  /*- set S -*/
    15901599  strat->sl = -1;
    1591   strat->spSpolyLoop =  spGetSpolyLoop(currRing, 
     1600  strat->spSpolyLoop =  spGetSpolyLoop(currRing,
    15921601                                       max(strat->ak, idRankFreeModule(q)),
    15931602                                       strat->syzComp, FALSE);
  • Singular/kutil.cc

    r5079a04 rc8bd75  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.17 1998-04-22 07:49:01 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.18 1998-04-23 09:52:11 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for std
     
    458458      {
    459459        if (i < 0)
    460         {
    461           //if (strat->next!=NULL)
    462           //{
    463           //  strat=strat->next;
    464           //  i=strat->tl;
    465           //}
    466           //else
    467           {
    468             /* not found : */
     460        {
     461          //if (strat->next!=NULL)
     462          //{
     463          //  strat=strat->next;
     464          //  i=strat->tl;
     465          //}
     466          //else
     467          {
     468            /* not found : */
    469469            pDelete(&p);
    470             break;
    471           }
    472         }
    473         else
    474         {
     470            break;
     471          }
     472        }
     473        else
     474        {
    475475          if (strat->T[i].p==p)
    476           {
    477             /* found : */
     476          {
     477            /* found : */
    478478            p=NULL;
    479             break;
    480           }
    481           i--;
    482         }
     479            break;
     480          }
     481          i--;
     482        }
    483483      }
    484484    }
     
    37683768      if (TEST_OPT_INTSTRATEGY)
    37693769      {
    3770         pCleardenom(strat->S[i]);
     3770        //if (strat->redTailChange)
     3771          pCleardenom(strat->S[i]);
    37713772      }
    37723773      if (TEST_OPT_PROT)
  • Singular/longalg.cc

    r5079a04 rc8bd75  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longalg.cc,v 1.23 1998-04-23 09:16:25 schmidt Exp $ */
     4/* $Id: longalg.cc,v 1.24 1998-04-23 09:52:14 Singular Exp $ */
    55/*
    66* ABSTRACT:   algebraic numbers
     
    965965    return napCopy(b);
    966966  }
     967  else
     968  if ((b==NULL)
     969  || ((b->ne==NULL)&&(nacIsZero(b->ko))))
     970  {
     971    return napCopy(a);
     972  }
    967973  if (naMinimalPoly != NULL)
    968974  {
     
    977983      y = a;
    978984    }
    979     g = napGcd0(x, y);
     985    if (!naIsChar0) g = napInit(1);
     986    else            g = napGcd0(x, y);
    980987    if (y->ne==NULL)
    981988    {
     
    10081015  g=a;
    10091016  h=b;
    1010   x = napGcd0(g,h);
     1017  if (!naIsChar0) x = napInit(1);
     1018  else            x = napGcd0(g,h);
     1019  //int huhu=0;
    10111020  for (i=(naNumbOfPar-1); i>=0; i--)
     1021  {
    10121022    x->e[i] = napExpi(i,a,b);
     1023    //huhu+=x->e[i];
     1024  }
     1025  //if (huhu!=0)
     1026  //{
     1027  //  Print("{%d}",huhu);
     1028  //}
    10131029  return x;
    10141030}
     
    17961812  }
    17971813  else
    1798     result->z = napGcd0(x->z, y->z);
     1814    result->z = napGcd(x->z, y->z); // change frpm napGcd0
    17991815  naTest((number)result);
    18001816  return (number)result;
  • Singular/polys1.cc

    r5079a04 rc8bd75  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys1.cc,v 1.11 1998-01-05 16:39:28 Singular Exp $ */
     4/* $Id: polys1.cc,v 1.12 1998-04-23 09:52:15 Singular Exp $ */
    55
    66/*
     
    276276  if (bNoAdd)
    277277    pSetm(p);
    278   else 
     278  else
    279279  #endif
    280280    p->Order *= exp;
     
    415415poly pPower(poly p, int i)
    416416{
     417  if (i==0)
     418    return pOne();
     419
    417420  poly rc=NULL;
    418421
     
    731734    pSetCoeff(p,nInit(1));
    732735  }
    733 #ifdef HAVE_FACTORY
    734   else if ( (nGetChar() == 1) || (nGetChar() < 0) )
    735   {
    736     pTest(ph);
    737     singclap_divide_content(ph);
    738     pTest(ph);
    739   }
    740 #endif
    741736  else
    742737  {
     
    753748      nNormalize(pGetCoeff(p));
    754749      d=nGcd(h,pGetCoeff(p));
    755       if(nIsOne(d))
    756       {
    757         nDelete(&h);
    758         nDelete(&d);
    759         return;
    760       }
    761750      nDelete(&h);
    762751      h = d;
     752      if(nIsOne(h))
     753      {
     754        break;
     755      }
    763756      pIter(p);
    764757    }
    765758    p = ph;
    766759    //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      }
    781777    }
    782778    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
    783787  }
    784788}
Note: See TracChangeset for help on using the changeset viewer.