Changeset 427ba9 in git


Ignore:
Timestamp:
Mar 27, 1998, 12:41:00 PM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
cf80ceb5ad2d43154cc45f6bfc38e7f519e69373
Parents:
f003a9aeaad4ef2031ca2798bf19a94a7d13fe06
Message:
* small bug fixes


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

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_GetPoly.cc

    rf003a9 r427ba9  
    33****************************************/
    44
    5 /* $Id: mpsr_GetPoly.cc,v 1.12 1998-03-23 22:51:02 obachman Exp $ */
     5/* $Id: mpsr_GetPoly.cc,v 1.13 1998-03-27 11:40:58 obachman Exp $ */
    66
    77/***************************************************************
     
    374374  MP_Sint32_t i;
    375375  MP_Uint32_t j;
    376   short *exp;
    377376
    378377  if (! IsCurrGetRing(cring))
     
    390389  if (gNvars > 1)
    391390  {
    392     mp_failr(IMP_GetSint32Vector(link, &gTa, gNvars));
    393     pGetComp(pp) = 0;
    394     for (i=0, exp = &(pp->exp[1]); i<gNvars; i++)
    395       exp[i] = (short) gTa[i];
     391    mp_failr(IMP_GetSint32Vector(link, &gTa[1], gNvars));
     392    for (i=1; i<=gNvars; i++)
     393      pSetExp(pp,i , (Exponent_t) gTa[i]);
    396394    pSetm(pp);
    397395
     
    401399      pp = pp->next;
    402400      failr(GetCoeff(link, &(pp->coef)));
    403       mp_failr(IMP_GetSint32Vector(link, &gTa, gNvars));
    404       pGetComp(pp) = 0;
    405       for (i=0, exp=&(pp->exp[1]); i<gNvars; i++)
    406         exp[i] = (short) gTa[i];
     401      mp_failr(IMP_GetSint32Vector(link, &gTa[1], gNvars));
     402      for (i=1; i<=gNvars; i++)
     403        pSetExp(pp, i, (Exponent_t) gTa[i]);
    407404      pSetm(pp);
    408405    }
     
    411408  {
    412409    mp_failr(IMP_GetSint32(link, &i));
    413     pGetComp(pp) = 0;
    414     pSetExp(pp,1, (short) i);
     410    pSetExp(pp,1, (Exponent_t) i);
    415411    pSetm(pp);
    416412   
     
    421417      failr(GetCoeff(link, &(pp->coef)));
    422418      mp_failr(IMP_GetSint32(link, &i));
    423       pGetComp(pp) = 0;
    424       pSetExp(pp,1, (short) i);
     419      pSetExp(pp,1, (Exponent_t) i);
    425420      pSetm(pp);
    426421    }
     
    439434  MP_Sint32_t i, n1;
    440435  MP_Uint32_t j;
    441   short *exp;
    442436
    443437  if (!IsCurrGetRing(cring))
     
    457451  {
    458452    mp_failr(IMP_GetSint32Vector(link, &gTa, n1));
    459     pGetComp(pp) = 0;
    460     for (i=0, exp=&(pGetComp(pp)); i<n1; i++)
    461       exp[i] = (short) gTa[i];
     453    pGetComp(pp) = gTa[0];
     454    for (i=1; i<n1; i++)
     455      pSetExp(pp, i, (Exponent_t) gTa[i]);
    462456    pSetm(pp);
    463457
     
    468462      failr(GetCoeff(link, &(pp->coef)));
    469463      mp_failr(IMP_GetSint32Vector(link, &gTa, n1));
    470       pGetComp(pp) = 0;
    471       for (i=0, exp=&(pGetComp(pp)); i<n1; i++)
    472         exp[i] = (short) gTa[i];
     464      pGetComp(pp) =  gTa[0];
     465      for (i=1; i<n1; i++)
     466        pSetExp(pp,i, (Exponent_t) gTa[i]);
    473467      pSetm(pp);
    474468    }
     
    477471  {
    478472    mp_failr(IMP_GetSint32(link, &i));
    479     pGetComp(pp) = (short) i;
     473    pGetComp(pp) = (Exponent_t) i;
    480474    mp_failr(IMP_GetSint32(link, &i));
    481     pSetExp(pp,1, (short) i);
     475    pSetExp(pp,1, (Exponent_t) i);
    482476    pSetm(pp);
    483477   
     
    488482      failr(GetCoeff(link, &(pp->coef)));
    489483      mp_failr(IMP_GetSint32(link, &i));
    490       pGetComp(pp) = (short) i;
     484      pGetComp(pp) = (Exponent_t) i;
    491485      mp_failr(IMP_GetSint32(link, &i));
    492       pSetExp(pp,1, (short) i);
     486      pSetExp(pp,1, (Exponent_t) i);
    493487      pSetm(pp);
    494488    }
  • Singular/mpsr_PutPoly.cc

    rf003a9 r427ba9  
    33****************************************/
    44
    5 /* $Id: mpsr_PutPoly.cc,v 1.9 1997-12-03 16:58:56 obachman Exp $ */
     5/* $Id: mpsr_PutPoly.cc,v 1.10 1998-03-27 11:40:59 obachman Exp $ */
    66
    77/***************************************************************
     
    252252mpsr_Status_t mpsr_PutPolyData(MP_Link_pt link, poly p, ring cring)
    253253{
    254   monomial exp;
    255 
    256254  if (cring != CurrPutRing)
    257255    SetPutFuncs(cring);
     
    270268    {
    271269      failr(PutCoeff(link, pGetCoeff(p)));
    272       for (i=1, exp = p->exp; i<=gNvars; i++)
    273         gTa[i] = (MP_Sint32_t) exp[i];
     270      for (i=1; i<=gNvars; i++)
     271        gTa[i] = (MP_Sint32_t) pGetExp(p, i);
    274272      mp_failr(IMP_PutSint32Vector(link, ta1, gNvars));
    275273      pIter(p);
     
    289287{
    290288  short i, n1;
    291   monomial exp;
    292289
    293290  if (cring != CurrPutRing)
     
    300297    {
    301298      failr(PutCoeff(link, pGetCoeff(p)));
    302       for (i=0, exp = p->exp; i< n1; i++)
    303         gTa[i] = (MP_Sint32_t) exp[i];
     299      gTa[0] = pGetComp(p);
     300      for (i=1; i< n1; i++)
     301        gTa[i] = (MP_Sint32_t) pGetExp(p,i);
    304302      mp_failr(IMP_PutSint32Vector(link, gTa, n1));
    305303      pIter(p);
  • Singular/syz1.cc

    rf003a9 r427ba9  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz1.cc,v 1.21 1998-03-16 14:56:48 obachman Exp $ */
     4/* $Id: syz1.cc,v 1.22 1998-03-27 11:41:00 obachman Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    5555static int highdeg_1;
    5656
    57 #include "syzvector.cc"
     57// uncomment to play around with new spolys for syzygies
     58// #include "syzvector.cc"
    5859
    5960/*3
Note: See TracChangeset for help on using the changeset viewer.