Changeset e0d91c in git


Ignore:
Timestamp:
Sep 22, 1998, 4:09:05 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
7709bf1f0117c77f62572e798d2164f8f0a773a4
Parents:
8a839d187e734df8873c2c8aa439609fb0eb3333
Message:
* hannes: cosmetic changes


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

Legend:

Unmodified
Added
Removed
  • Singular/algmap.cc

    r8a839d1 re0d91c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: algmap.cc,v 1.10 1998-03-27 15:43:17 obachman Exp $ */
     4/* $Id: algmap.cc,v 1.11 1998-09-22 14:09:00 Singular Exp $ */
    55/*
    66* ABSTRACT - the mapping of polynomials from rings with
     
    204204  poly q, q0, q1 = NULL;
    205205  int i;
    206  
     206
    207207  if (s == 0)
    208208  {
  • Singular/clapsing.cc

    r8a839d1 re0d91c  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapsing.cc,v 1.39 1998-07-29 13:55:43 Singular Exp $
     5// $Id: clapsing.cc,v 1.40 1998-09-22 14:09:01 Singular Exp $
    66/*
    77* ABSTRACT: interface between Singular and factory
     
    407407    CanonicalForm g, h;
    408408    poly p = pNext(f);
    409     nTest(pGetCoeff(f));
     409    //nTest(pGetCoeff(f));
    410410    FACTORY_ALGOUT( "G = ", (((lnumber)pGetCoeff(f))->z) );
    411411    g = convSingTrClapP( ((lnumber)pGetCoeff(f))->z );
     
    414414    while ( (p != NULL) && (g != 1) )
    415415    {
    416       nTest(pGetCoeff(p));
     416      //nTest(pGetCoeff(p));
    417417      FACTORY_ALGOUT( "h = ", (((lnumber)pGetCoeff(p))->z) );
    418418      h = convSingTrClapP( ((lnumber)pGetCoeff(p))->z );
     
    464464        #endif
    465465        c->z=convClapPSingTr( i.getItem() / g );
    466         nTest((number)c);
     466        //nTest((number)c);
    467467        //#ifdef LDEBUG
    468468        //number cn=(number)c;
     
    940940  int sw=(int)dummy->Data();
    941941  ideal f=singclap_factorize((poly)(u->Data()), &v, sw);
     942  if (f==NULL)
     943    return TRUE;
    942944  switch(sw)
    943945  {
     
    957959    case 1:
    958960      res->data=(void *)f;
    959       return f==NULL;
     961      return FALSE;
     962    case 3:
     963      {
     964        poly p=f->m[0];
     965        int i=IDELEMS(f);
     966        f->m[0]=NULL;
     967        while(i>1)
     968        {
     969          i--;
     970          p=pMult(p,f->m[i]);
     971          f->m[i]=NULL;
     972        }
     973        res->data=(void *)p;
     974        res->rtyp=POLY_CMD;
     975      }
     976      return FALSE;
    960977  }
    961978  WerrorS("invalid switch");
  • Singular/syz0.cc

    r8a839d1 re0d91c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz0.cc,v 1.16 1998-06-12 17:41:41 obachman Exp $ */
     4/* $Id: syz0.cc,v 1.17 1998-09-22 14:09:02 Singular Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    433433  int j,i=0;
    434434  poly p;
    435  
     435
    436436  if (toNorm==NULL) return NULL;
    437437  p = pHead(toNorm);
     
    447447      //pNorm(toNorm);
    448448      toNorm = spSpolyRed(currQuotient->m[i],toNorm,NULL, SpolyLoop);
    449       pDelete(&p); 
     449      pDelete(&p);
    450450      if (toNorm==NULL) return NULL;
    451451      p = pHead(toNorm);
     
    805805        bl1[j] = currRing->block1[m_order];
    806806        wv[j] = currRing->wvhdl[m_order];
    807         tmpR = *currRing;
    808         tmpR.order = ord;
    809         tmpR.block0 = bl0;
    810         tmpR.block1 = bl1;
    811         tmpR.wvhdl = wv;
    812         rComplete(&tmpR);
     807        tmpR = *currRing;
     808        tmpR.order = ord;
     809        tmpR.block0 = bl0;
     810        tmpR.block1 = bl1;
     811        tmpR.wvhdl = wv;
     812        rComplete(&tmpR);
    813813        rChangeCurrRing(&tmpR, TRUE);
    814814      }
  • Singular/syz1.cc

    r8a839d1 re0d91c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz1.cc,v 1.31 1998-08-05 11:40:58 siebert Exp $ */
     4/* $Id: syz1.cc,v 1.32 1998-09-22 14:09:03 Singular Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    169169           /*4 handle module case:*/
    170170           if (pGetComp(p1)==pGetComp(p2)) return 0;
    171            else if 
    172               (currcomponents[pGetComp(p1)]>currcomponents[pGetComp(p2)]) 
     171           else if
     172              (currcomponents[pGetComp(p1)]>currcomponents[pGetComp(p2)])
    173173                return 1;
    174174           else return -1;
     
    194194  int n1 = normal_syzcomp2dpc(p1, p2);
    195195  int n2 = SyVecSyzCmp(p1, p2);
    196  
     196
    197197  if (n1 != n2)
    198198  {
     
    281281  }
    282282  for (int i=0;i<pVariables;i++)
    283   { 
     283  {
    284284    binomials[i*(highdeg_1)/*i,0*/]=0;
    285285  }
     
    323323  poly q,result=q=pNew();
    324324  int j;
    325  
     325
    326326  if (pGetOrder(p)>0)
    327327  {
    328     loop 
     328    loop
    329329    {
    330330      spMemcpy(q,p);
     
    346346    poly lastmon=NULL;
    347347    int i=0;
    348     loop 
     348    loop
    349349    {
    350350      if (pGetOrder(p)!=i)
     
    380380  poly q,result=q=pNew();
    381381  int j;
    382  
     382
    383383  if (pGetOrder(p)>0)
    384384  {
    385     loop 
     385    loop
    386386    {
    387387      spMemcpy(q,p);
     
    404404    poly lastmon=NULL;
    405405    int i=0;
    406     loop 
     406    loop
    407407    {
    408408      if (pGetOrder(p)!=i)
     
    439439  poly q,result=q=pNew();
    440440  int j;
    441  
     441
    442442  if (pGetOrder(p)>0)
    443443  {
    444     loop 
     444    loop
    445445    {
    446446      spMemcpy(q,p);
     
    462462    poly lastmon=NULL;
    463463    int i=0;
    464     loop 
     464    loop
    465465    {
    466466      if (pGetOrder(p)!=i)
     
    574574{
    575575  poly temp1 = pCopy(m1);
    576  
     576
    577577  poly p1 = normal_sySPAdd(m1, m2, m);
    578578  poly p2 = syVecSpoly(m2, temp1, m);
    579  
     579
    580580  pTest(p1);
    581581  pTest(p2);
    582   if (p1 != NULL) 
     582  if (p1 != NULL)
    583583  {
    584584    if (p2 == NULL || ! pEqual(p1, p2))
     
    591591    }
    592592  }
    593   else if (p2 != NULL) 
     593  else if (p2 != NULL)
    594594    PrintS("Error in SySpoly\n");
    595595
     
    683683        break;
    684684    }
    685     else 
     685    else
    686686    {
    687687      j = currcomponents[pGetComp(m1)]-currcomponents[pGetComp(m2)];
     
    695695          break;
    696696      }
    697       else 
     697      else
    698698      {
    699699        if (j<0/*currcomponents[pGetComp(m1)]<currcomponents[pGetComp(m2)]*/)
     
    809809#if defined(HAVE_SY_VECTOR) && ! defined (SY_VEC_DEBUG)
    810810    res = sySpolyProc(m2, m1,a);
    811 #else   
     811#else
    812812  if (pGetOrder(m1)>0)
    813813  {
     
    940940      arg->m[(*iv)[i]-1] = NULL;
    941941      (resPairs[0])[i].order = pTotaldegree((resPairs[0])[i].syz);
    942     } 
     942    }
    943943  }
    944944  else
     
    983983  if (p==NULL) return;
    984984  if (realcomp==0) realcomp=1;
    985  
     985
    986986  if (index>1)
    987987    tc = trind1[pGetComp(p)]-1;
     
    10641064          if (o_r->m[l]!=NULL)
    10651065          {
    1066             isDivisible = isDivisible || 
     1066            isDivisible = isDivisible ||
    10671067              pDivisibleBy2(o_r->m[l],tso.lcm);
    10681068          }
     
    11151115          if (o_r->m[l]!=NULL)
    11161116          {
    1117             isDivisible = isDivisible || 
     1117            isDivisible = isDivisible ||
    11181118              pDivisibleBy2(o_r->m[l],tso.lcm);
    11191119          }
     
    11291129    else
    11301130    {
    1131       nextPairs[i].p = 
     1131      nextPairs[i].p =
    11321132        sySPoly(tso.p1, tso.p2,tso.lcm);
    11331133      (*spl)[i] = pLength(nextPairs[i].p);
     
    11421142    for (i1=0;i1<howmuch;i1++)
    11431143    {
    1144       if (i2==-1) 
     1144      if (i2==-1)
    11451145      {
    11461146        if ((*spl)[i1]!=-1)
     
    11741174* reduces all pairs of degree deg in the module index
    11751175* put the reduced generators to the resolvente which contains
    1176 * the truncated kStd 
     1176* the truncated kStd
    11771177*/
    11781178static void syRedNextPairs(SSet nextPairs, syStrategy syzstr,
     
    12011201    if ((tso.p1!=NULL) && (tso.p2!=NULL))
    12021202    {
    1203       coefgcd = 
     1203      coefgcd =
    12041204        nGcd(pGetCoeff(tso.p1),pGetCoeff(tso.p2));
    12051205      tso.syz = pHead(tso.lcm);
     
    13101310        if (index % 2==0)
    13111311          euler++;
    1312         else 
     1312        else
    13131313          euler--;
    13141314      }
     
    13541354  }
    13551355  delete spl1;
    1356 } 
     1356}
    13571357
    13581358/*3
     
    13681368
    13691369  while ((k>0) && (res->m[k-1]==NULL)) k--;
    1370   while ((i<(*syzstr->Tl)[index-1]) && (((sPairs)[i].syz==NULL) || 
     1370  while ((i<(*syzstr->Tl)[index-1]) && (((sPairs)[i].syz==NULL) ||
    13711371          ((sPairs)[i].order<deg)))
    13721372    i++;
    13731373  if ((i>=(*syzstr->Tl)[index-1]) || ((sPairs)[i].order>deg)) return;
    13741374  while ((i<(*syzstr->Tl)[index-1]) && (((sPairs)[i].syz==NULL) ||
    1375          ((sPairs)[i].order==deg))) 
     1375         ((sPairs)[i].order==deg)))
    13761376  {
    13771377    if ((sPairs)[i].syz!=NULL)
    13781378    {
    13791379      j = k-1;
    1380       while ((j>=0) && (res->m[j]!=NULL) && 
     1380      while ((j>=0) && (res->m[j]!=NULL) &&
    13811381             ((sPairs)[i].syz!=NULL))
    13821382      {
     
    13841384        {
    13851385          //Print("r");
    1386           (sPairs)[i].syz = 
     1386          (sPairs)[i].syz =
    13871387            //spSpolyRed(res->m[j],(sPairs)[i].syz,NULL);
    13881388            sySPolyRed((sPairs)[i].syz,res->m[j]);
     
    14631463  {
    14641464    int an=0,en=sP-1;
    1465     loop 
     1465    loop
    14661466    {
    14671467      if (an>=en-1)
     
    15371537      pSetComp(p,j+1);
    15381538      ii = first;
    1539       loop 
     1539      loop
    15401540      {
    15411541        j1 = bci[ii];
     
    15931593        {
    15941594          int ii=index-1,jj=pGetComp(q);
    1595           while (ii>0) 
     1595          while (ii>0)
    15961596          {
    15971597            jj = pGetComp(syzstr->res[ii]->m[jj-1]);
     
    16411641  SSet result;
    16421642  SRes resPairs=syzstr->resPairs;
    1643  
     1643
    16441644  if (an>syzstr->length) return NULL;
    16451645  if (en>syzstr->length) en=syzstr->length;
     
    17091709      {
    17101710        t = *actdeg+*index;
    1711         if (((resPairs[*index])[i].lcm!=NULL) || 
     1711        if (((resPairs[*index])[i].lcm!=NULL) ||
    17121712              ((resPairs[*index])[i].syz!=NULL))
    17131713        {
     
    17221722        }
    17231723        i++;
    1724       } 
     1724      }
    17251725    }
    17261726    (*index)++;
     
    17821782*  int newdeg=*actdeg,newindex=-1,i,t;
    17831783*  SSet result;
    1784 * 
     1784*
    17851785*  while (*index>=0)
    17861786*  {
     
    18631863*        }
    18641864*        i++;
    1865 *      } 
     1865*      }
    18661866*    }
    18671867*    (*index)--;
     
    19121912  int result;
    19131913
    1914   if (syzstr->res[index]==NULL) 
     1914  if (syzstr->res[index]==NULL)
    19151915  {
    19161916    syzstr->res[index] = idInit(init-1,1);
     
    19491949  {
    19501950    int i,j;
    1951  
     1951
    19521952    if (syzstr->resPairs!=NULL)
    19531953    {
     
    20662066    int i,j=-1,jj=-1,l;
    20672067    SRes rP=syzstr->resPairs;
    2068    
     2068
    20692069    l = syzstr->length;
    20702070    while ((l>0) && (rP[l-1]==NULL)) l--;
     
    20742074    {
    20752075      i = 0;
    2076       while ((i<(*syzstr->Tl)[l]) && 
     2076      while ((i<(*syzstr->Tl)[l]) &&
    20772077        ((rP[l][i].lcm!=NULL) || (rP[l][i].syz!=NULL)))
    20782078      {
    2079         if (rP[l][i].isNotMinimal==NULL) 
     2079        if (rP[l][i].isNotMinimal==NULL)
    20802080        {
    20812081          if (j<rP[l][i].order-l)
     
    20942094    {
    20952095      j = 0;
    2096       while ((j<(*syzstr->Tl)[i]) && 
     2096      while ((j<(*syzstr->Tl)[i]) &&
    20972097        ((rP[i][j].lcm!=NULL) || (rP[i][j].syz!=NULL)))
    20982098      {
     
    21472147  {
    21482148    SRes rP=syzstr->resPairs;
    2149    
     2149
    21502150    l = syzstr->length;
    21512151    while ((l>0) && (rP[l-1]==NULL)) l--;
     
    21552155    {
    21562156      i = 0;
    2157       while ((i<(*syzstr->Tl)[l]) && 
     2157      while ((i<(*syzstr->Tl)[l]) &&
    21582158        ((rP[l][i].lcm!=NULL) || (rP[l][i].syz!=NULL)) &&
    21592159        (rP[l][i].isNotMinimal!=NULL))
     
    21692169    return l;
    21702170  }
    2171   else 
     2171  else
    21722172    return sySize(syzstr);
    21732173}
     
    22282228void syPrint(syStrategy syzstr)
    22292229{
    2230   if ((syzstr->resPairs==NULL) && (syzstr->fullres==NULL) 
     2230  if ((syzstr->resPairs==NULL) && (syzstr->fullres==NULL)
    22312231     && (syzstr->minres==NULL))
    22322232  {
     
    22462246      {
    22472247        j=0;
    2248         while ((j<(*syzstr->Tl)[l]) && 
     2248        while ((j<(*syzstr->Tl)[l]) &&
    22492249          ((rP[l][j].lcm!=NULL) || (rP[l][j].syz!=NULL)))
    22502250        {
     
    23292329  resolvente fullres;
    23302330  fullres = (resolvente)Alloc0((length+1)*sizeof(ideal));
    2331   if (totake==NULL) 
     2331  if (totake==NULL)
    23322332    totake = res;
    23332333  for (i=length-1;i>0;i--)
     
    24712471  if (toStrip==NULL) return p;
    24722472  poly pp=p;
    2473  
     2473
    24742474  while ((pp!=NULL) && ((*toStrip)[pGetComp(pp)]!=0))
    24752475    pDelete1(&pp);
    24762476  p = pp;
    2477   if (pp!=NULL) 
     2477  if (pp!=NULL)
    24782478  {
    24792479    while (pNext(pp)!=NULL)
     
    25222522          pGetCoeff(tq) = nNeg(pGetCoeff(tq));
    25232523          q = syAdd(q,syMultT1(tempStripped,tq));
    2524         } 
     2524        }
    25252525        pIter(p);
    25262526      }
     
    25582558        {
    25592559          ri->m[j] = ri->m[j+k];
    2560           (*changes)[j+k+1] = j+1; 
     2560          (*changes)[j+k+1] = j+1;
    25612561          j++;
    25622562        }
     
    26222622        else
    26232623        {
    2624           if (sPairs[i].syzind<l) 
     2624          if (sPairs[i].syzind<l)
    26252625          {
    26262626            l = sPairs[i].syzind;
     
    26342634    j++;
    26352635    k = l;
    2636   } 
     2636  }
    26372637  return result;
    26382638}
    26392639
    2640 static resolvente syReadOutMinimalRes(syStrategy syzstr, 
     2640static resolvente syReadOutMinimalRes(syStrategy syzstr,
    26412641           BOOLEAN computeStd=FALSE)
    26422642{
     
    26592659  pSetmProc oldSetm=pSetm;
    26602660  pCompProc oldComp0=pComp0;
    2661  
     2661
    26622662  if ((currRing->order[0]==ringorder_dp)
    26632663  &&  (currRing->order[1]==ringorder_C)
     
    26842684    rChangeCurrRing(&tmpR, TRUE);
    26852685  }
    2686 #if ! defined(HAVE_SY_VECTOR) || defined(SY_VEC_DEBUG) 
     2686#if ! defined(HAVE_SY_VECTOR) || defined(SY_VEC_DEBUG)
    26872687  pSetm =syzSetm;
    26882688#endif
     
    28082808  ring origR = currRing;
    28092809
    2810   if ((idIs0(arg)) || 
     2810  if ((idIs0(arg)) ||
    28112811      ((idRankFreeModule(arg)>0) && (!idHomModule(arg,NULL,&(syzstr->cw)))))
    28122812  {
     
    28332833  {
    28342834    ord=NULL;
    2835   } 
     2835  }
    28362836/*--- changes to a dpC-ring with special comp0------*/
    28372837  else
     
    28512851    //pChangeRing(pVariables,1,ord,b0,b1,currRing->wvhdl);
    28522852    rChangeCurrRing(&tmpR, TRUE);
    2853   } 
     2853  }
    28542854/*--- initializes the data structures---------------*/
    28552855  syzstr->Tl = new intvec(*length);
     
    28582858  {
    28592859    temp->m[i] = pOrdPolyInsertSetm(pCopy(arg->m[i]));
    2860     if (temp->m[i]!=NULL) 
     2860    if (temp->m[i]!=NULL)
    28612861    {
    28622862      j = pTotaldegree(temp->m[i]);
     
    28702870  binomials = (int*)Alloc(pVariables*(highdeg+1)*sizeof(int));
    28712871  syBinomSet();
    2872 #if ! defined(HAVE_SY_VECTOR) || defined(SY_VEC_DEBUG) 
     2872#if ! defined(HAVE_SY_VECTOR) || defined(SY_VEC_DEBUG)
    28732873  pSetm =syzSetm;
    28742874  for (i=0;i<IDELEMS(temp);i++)
     
    29052905  nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
    29062906  //if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index);
    2907 /*--- computes the resolution ----------------------*/ 
     2907/*--- computes the resolution ----------------------*/
    29082908  while (nextPairs!=NULL)
    29092909  {
     
    29232923    else
    29242924      syRedGenerOfCurrDeg(syzstr,actdeg,index+1);
    2925 /*--- creates new pairs -----------------------------*/     
     2925/*--- creates new pairs -----------------------------*/
    29262926    syCreateNewPairs(syzstr,index,i);
    2927     if (index<(*length)-1) 
     2927    if (index<(*length)-1)
    29282928    {
    29292929      syCreateNewPairs(syzstr,index+1,j);
     
    29532953    Free((ADDRESS)b0,3*sizeof(int));
    29542954    Free((ADDRESS)b1,3*sizeof(int));
    2955   } 
     2955  }
    29562956  syzstr->binom = binomials;
    29572957  syzstr->highdeg_1 = highdeg_1;
  • Singular/tesths.cc

    r8a839d1 re0d91c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.51 1998-08-03 16:39:34 Singular Exp $ */
     4/* $Id: tesths.cc,v 1.52 1998-09-22 14:09:05 Singular Exp $ */
    55
    66/*
     
    278278  ttGen2();
    279279#else
    280   int i;
    281280  thisfile = argv[0];
    282281  BOOLEAN load_std_lib=TRUE;
     
    297296    switch(optc)
    298297    {
    299    
     298
    300299        case 'b':
    301 #ifdef HAVE_MPSR   
     300#ifdef HAVE_MPSR
    302301          feBatch=TRUE;
    303302          mainSetSingOptionValue(LON_BATCH, (char*) 1);
     
    339338          tclmode = TRUE;
    340339          mainSetSingOptionValue(LON_TCLMODE, (char*) 1);
    341           verbose|=Sy_bit(V_SHOW_MEM);
     340          verbose|=Sy_bit(V_SHOW_MEM);
    342341          break;
    343342#else
     
    378377          mainSetSingOptionValue(LON_EXECUTE, optarg);
    379378          break;
    380    
     379
    381380        case 'r':
    382381          errno = 0;
     
    398397          mainSetSingOptionValue(LON_RANDOM, optarg);
    399398          break;
    400    
     399
    401400        case 'u':
    402401          mainSetSingOptionValue(LON_USER_OPTION, optarg);
     
    436435            mainSetSingOptionValue(LON_MP_HOST, optarg);
    437436          }
    438 #endif   
     437#endif
    439438          else if (strcmp(longopts[option_index].name, LON_TICKS_PER_SEC) == 0)
    440439          {
     
    507506  errorreported = 0;
    508507#ifndef macintosh
    509 #if defined(HAVE_FEREAD) || defined(HAVE_READLINE)
     508#if defined(HAVE_READLINE)
    510509  fe_set_input_mode();
    511510#endif
Note: See TracChangeset for help on using the changeset viewer.