Changeset e1b9f91 in git


Ignore:
Timestamp:
Oct 20, 1999, 1:52:03 PM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
26deb2c404b8f17c872722c09abd1355337a0287
Parents:
30ff807d4b57c77ac10958c9dff99ebf16018415
Message:
* introduced sev in syz
* fixed ringorder_s stuff


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

Legend:

Unmodified
Added
Removed
  • Singular/ideals.cc

    r30ff80 re1b9f91  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.65 1999-10-20 07:31:58 siebert Exp $ */
     4/* $Id: ideals.cc,v 1.66 1999-10-20 11:52:00 obachman Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    15221522
    15231523  ideal s_h3=idPrepare(s_h1,s_quot,h,k,&quotgen,&i,&w);
     1524  ideal s_h2 = idInit(IDELEMS(s_h3), s_h3->rank);
    15241525
    15251526  if (w!=NULL) delete w;
    15261527  i = 0;
    1527   for (j=0;j<IDELEMS(s_h3);j++)
    1528   {
    1529     if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j]) <= k))
     1528  for (j=0; j<IDELEMS(s_h3); j++)
     1529  {
     1530    if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j],syz_ring) <= k))
     1531    {
    15301532      i++;
    1531   }
    1532   j = IDELEMS(s_h1);
    1533   if (s_quot!=NULL) idDelete(&s_quot);
    1534 
    1535   if (syz_ring!=orig_ring)
    1536     rChangeCurrRing(orig_ring,TRUE);
    1537   pSetSyzComp(0);
    1538 
    1539   idDelete((ideal*)ma);
    1540   *ma = mpNew(j,i);
    1541   i = -1;
    1542   ideal e=idInit(16,h1->rank);
    1543   for (j=0; j<IDELEMS(s_h3); j++)
    1544   {
    1545     if ((s_h3->m[j] != NULL) && (pMinComp(s_h3->m[j],syz_ring) <= k))
    1546     {
    1547       if (syz_ring==orig_ring)
    1548         q = pCopy(s_h3->m[j]);
    1549       else
    1550         q = pPermPoly(s_h3->m[j],NULL,syz_ring,NULL,0);
    1551       qq=q;
     1533      q = s_h3->m[j];
    15521534      while (pNext(q) != NULL)
    15531535      {
    15541536        if (pGetComp(pNext(q)) > k)
    15551537        {
    1556           p = pNext(q);
    1557           pNext(q) = pNext(pNext(q));
    1558           pNext(p) = NULL;
    1559           t=pGetComp(p);
    1560           pSetComp(p,0);
    1561           pSetmComp(p);
    1562           MATELEM(*ma,t-k,i+2) = pAdd(MATELEM(*ma,t-k,i+2),p);
     1538          s_h2->m[j] = pNext(q);
     1539          pNext(q) = NULL;
    15631540        }
    15641541        else
     
    15671544        }
    15681545      }
    1569       if (!inputIsIdeal) pShift(&qq,-1);
    1570       q = qq;
    1571       if (q !=NULL)
    1572       {
    1573         i++;
    1574         if (i+1 >= IDELEMS(e))
    1575         {
    1576           pEnlargeSet(&(e->m),IDELEMS(e),16);
    1577           IDELEMS(e) += 16;
    1578         }
    1579         e->m[i] = q;
    1580       }
    1581     }
    1582   }
    1583   if (syz_ring==orig_ring)
    1584     idDelete(&s_h3);
    1585   else
    1586   {
    1587     rChangeCurrRing(syz_ring,FALSE);
    1588     idDelete(&s_h3);
     1546      if (!inputIsIdeal) pShift(&(s_h3->m[j]), -1);
     1547    }
     1548    else
     1549    {
     1550      pDelete(&(s_h3->m[j]));
     1551    }
     1552  }
     1553
     1554  idSkipZeroes(s_h3);
     1555  j = IDELEMS(s_h1);
     1556  if (s_quot!=NULL) idDelete(&s_quot);
     1557
     1558  if (syz_ring!=orig_ring)
    15891559    rChangeCurrRing(orig_ring,TRUE);
    1590     rKill(syz_ring);
    1591   }
    1592   idSkipZeroes(e);
    1593   return e;
     1560  pSetSyzComp(0);
     1561  idDelete((ideal*)ma);
     1562  *ma = mpNew(j,i);
     1563
     1564  i = 1;
     1565  for (j=0; j<IDELEMS(s_h2); j++)
     1566  {
     1567    if (s_h2->m[j] != NULL)
     1568    {
     1569      q = pFetchCopyDelete(syz_ring, s_h2->m[j]);
     1570      s_h2->m[j] = NULL;
     1571     
     1572      while (q != NULL)
     1573      {
     1574        p = q;
     1575        pIter(q);
     1576        pNext(p) = NULL;
     1577        t=pGetComp(p);
     1578        pSetComp(p,0);
     1579        pSetmComp(p);
     1580        MATELEM(*ma,t-k,i) = pAdd(MATELEM(*ma,t-k,i),p);
     1581      }
     1582      i++;
     1583    }
     1584  }
     1585  idDelete(&s_h2);
     1586
     1587  for (i=0; i<IDELEMS(s_h3); i++)
     1588  {
     1589    s_h3->m[i] = pFetchCopyDelete(syz_ring, s_h3->m[i]);
     1590  }
     1591
     1592  if (syz_ring!=orig_ring) rKill(syz_ring);
     1593  return s_h3;
    15941594}
    15951595
  • Singular/kutil.cc

    r30ff80 re1b9f91  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.43 1999-10-19 12:42:45 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.44 1999-10-20 11:52:01 obachman Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    30633063          redSi=pHead((strat->S)[i]);
    30643064          (strat->S)[i] = redMora((strat->S)[i],i-1,strat);
    3065           kTest(strat);
    30663065          if ((strat->S)[i]==NULL)
    30673066          {
     
    30903089            strat->sevS[i] = h.sev;
    30913090          }
     3091          kTest(strat);
    30923092        }
    30933093        i++;
  • Singular/polys.cc

    r30ff80 re1b9f91  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys.cc,v 1.50 1999-10-19 12:42:47 obachman Exp $ */
     4/* $Id: polys.cc,v 1.51 1999-10-20 11:52:02 obachman Exp $ */
    55
    66/*
     
    474474      case ringorder_C:
    475475      case ringorder_S:
     476      case ringorder_s:
    476477        break;
    477478      case ringorder_a:
     
    696697  firstwv=NULL;
    697698  polys_wv=r->wvhdl;
    698   if (order[0]==ringorder_S)
     699  if (order[0]==ringorder_S ||order[0]==ringorder_s)
    699700  {
    700701    order++;
     
    711712  /*======== ordering type is (_,c) =========================*/
    712713  if ((order[0]==ringorder_unspec)
    713   ||(
    714     ((order[1]==ringorder_c)||(order[1]==ringorder_C)||(order[1]==ringorder_S))
     714      ||(
     715    ((order[1]==ringorder_c)||(order[1]==ringorder_C)
     716     ||(order[1]==ringorder_S)
     717     ||(order[1]==ringorder_s))
    715718    && (order[0]!=ringorder_M)
    716719    && (order[2]==0))
    717   )
     720    )
    718721  {
    719722    if ((order[0]!=ringorder_unspec)
    720     && ((order[1]==ringorder_C)||(order[1]==ringorder_S)))
     723    && ((order[1]==ringorder_C)||(order[1]==ringorder_S)||
     724        (order[1]==ringorder_s)))
    721725      pComponentOrder=-1;
    722726    if (pOrdSgn == -1) pLDeg = ldeg0c;
     
    733737  /*======== ordering type is (c,_) =========================*/
    734738  else if (((order[0]==ringorder_c)
    735     ||(order[0]==ringorder_C)
    736     ||(order[0]==ringorder_S))
     739            ||(order[0]==ringorder_C)
     740            ||(order[0]==ringorder_S)
     741            ||(order[0]==ringorder_s))
    737742  && (order[1]!=ringorder_M)
    738743  &&  (order[2]==0))
    739744  {
    740745    /* pLDeg = ldeg0; is standard*/
    741     if ((order[0]==ringorder_C)||(order[0]==ringorder_S))
     746    if ((order[0]==ringorder_C)||(order[0]==ringorder_S)||
     747        order[0]==ringorder_s)
    742748      pComponentOrder=-1;
    743749    if ((order[1] == ringorder_lp) || (order[1] == ringorder_ls))
     
    758764    //pLexOrder=TRUE;
    759765    pVectorOut=order[0]==ringorder_c;
    760     if ((pVectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S))
     766    if ((pVectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S)||(order[0]==ringorder_s))
    761767    {
    762768      if(block1[1]!=pVariables) pLexOrder=TRUE;
     
    779785
    780786    if ((order[0]!=ringorder_c)
    781     &&(order[0]!=ringorder_C)
    782     &&(order[0]!=ringorder_S))
     787        && (order[0]!=ringorder_C)
     788        && (order[0]!=ringorder_S)
     789        && (order[0]!=ringorder_s))
    783790    {
    784791      pLDeg = ldeg1c;
  • Singular/syz.h

    r30ff80 re1b9f91  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: syz.h,v 1.20 1999-10-19 12:42:49 obachman Exp $ */
     6/* $Id: syz.h,v 1.21 1999-10-20 11:52:02 obachman Exp $ */
    77/*
    88* ABSTRACT: Resolutions
     
    5353  intvec * cw;
    5454  intvec * betti;
    55   short list_length;
    56   short references;
    5755  kBucket_pt bucket;
    5856  kBucket_pt syz_bucket;
    5957  ring syRing;
    60   int length;
    6158  resolvente fullres;
    6259  resolvente minres;
     60  unsigned long ** sev;
     61  int length;
     62  short list_length;
     63  short references;
    6364};
    6465
  • Singular/syz1.cc

    r30ff80 re1b9f91  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz1.cc,v 1.43 1999-10-19 12:42:49 obachman Exp $ */
     4/* $Id: syz1.cc,v 1.44 1999-10-20 11:52:03 obachman Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    872872                               (IDELEMS(syzstr->res[index])+1)*sizeof(int),
    873873                               (IDELEMS(syzstr->res[index])+17)*sizeof(int));
    874 //Print("sort %d has now size %d\n",index,IDELEMS(res[index])+17);
     874  syzstr->sev[index]=(unsigned long*)ReAlloc0((ADDRESS)syzstr->sev[index],
     875                                    (IDELEMS(syzstr->res[index])+1)*sizeof(unsigned long),
     876                               (IDELEMS(syzstr->res[index])+17)*sizeof(unsigned long));
    875877  IDELEMS(syzstr->res[index]) += 16;
    876878  pEnlargeSet(&(syzstr->orderedRes[index]->m),IDELEMS(syzstr->orderedRes[index]),16);
     
    15891591    syzstr->elemLength[index] = (int*)Alloc0(init*sizeof(int));
    15901592    syzstr->orderedRes[index] = idInit(init-1,1);
     1593    syzstr->sev[index] = (unsigned long*) Alloc0(init*sizeof(unsigned long));
    15911594    result = 0;
    15921595  }
     
    17121715      Free((ADDRESS)syzstr->truecomponents,(syzstr->length+1)*sizeof(int*));
    17131716      Free((ADDRESS)syzstr->ShiftedComponents,(syzstr->length+1)*sizeof(long*));
     1717      if (syzstr->sev != NULL)
     1718        Free(((ADDRESS)syzstr->sev), (syzstr->length+1)*sizeof(unsigned long*));
    17141719      Free((ADDRESS)syzstr->backcomponents,(syzstr->length+1)*sizeof(int*));
    17151720      Free((ADDRESS)syzstr->Howmuch,(syzstr->length+1)*sizeof(int*));
     
    27242729  syzstr->Howmuch = (int**)Alloc0((*length+1)*sizeof(int*));
    27252730  syzstr->Firstelem = (int**)Alloc0((*length+1)*sizeof(int*));
     2731  syzstr->sev = (unsigned long **) Alloc0((*length+1)*sizeof(unsigned long *));
    27262732  syzstr->bucket = kBucketCreate();
    27272733  int len0=idRankFreeModule(arg)+1;
Note: See TracChangeset for help on using the changeset viewer.