Changeset 0fe7d1 in git


Ignore:
Timestamp:
Nov 10, 1998, 6:18:20 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
d2cd2f7dc5043473c7e1101e81f20552783ed920
Parents:
b711e1f9cda4ccc2a400ee15421ed1be6ced6d08
Message:
*hannes: pFetchCopy simplified


git-svn-id: file:///usr/local/Singular/svn/trunk@2659 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/polys-impl.cc

    rb711e1 r0fe7d1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys-impl.cc,v 1.18 1998-11-06 14:44:13 obachman Exp $ */
     4/* $Id: polys-impl.cc,v 1.19 1998-11-10 17:18:20 Singular Exp $ */
    55
    66/***************************************************************
     
    203203    a->coef=nCopy(p->coef);
    204204    pSetm(a);
    205     if (pNext(p)!=NULL)
    206     {
     205    pIter(p);
     206    while (p!=NULL)
     207    {
     208#ifdef PDEBUG
     209      a = pNext(a) = pDBNew(f,l);
     210#else
     211      a = pNext(a) = pNew();
     212#endif
     213      pCopy2(a,p);
     214      a->coef=nCopy(p->coef);
     215      pSetm(a);
    207216      pIter(p);
    208       do
    209       {
    210 #ifdef PDEBUG
    211         a = pNext(a) = pDBNew(f,l);
    212 #else
    213         a = pNext(a) = pNew();
    214 #endif
    215         pCopy2(a,p);
    216         a->coef=nCopy(p->coef);
    217         pSetm(a);
    218         pIter(p);
    219       }
    220       while (p!=NULL);
    221217    }
    222218    pNext(a) = NULL;
     
    232228    RingCopy2ExpV(res, p, r);
    233229    pSetm(res);
    234     if (pNext(p) != NULL)
    235     {
     230    pIter(p);
     231    while (p != NULL)
     232    {
     233      // the VarOffset's are different: Hence we
     234      // convert betweeen a lex order and a revlex order -- to speed
     235      // up the sorting, we assemble new poly in inverse order
     236#ifdef PDEBUG
     237      res = pDBInit(f,l);
     238#else
     239      res = pInit();
     240#endif
     241      pNext(res) = a;
     242      a = res;
     243      res->coef = nCopy(p->coef);
     244      RingCopy2ExpV(res, p, r);
     245      pSetm(res);
    236246      pIter(p);
    237       do
    238       {
    239         // the VarOffset's are different: Hence we
    240         // convert betweeen a lex order and a revlex order -- to speed
    241         // up the sorting, we assemble new poly in inverse order
    242 #ifdef PDEBUG
    243         res = pDBInit(f,l);
    244 #else
    245         res = pInit();
    246 #endif
    247         pNext(res) = a;
    248         a = res;
    249         res->coef = nCopy(p->coef);
    250         RingCopy2ExpV(res, p, r);
    251         pSetm(res);
    252         pIter(p);
    253       }
    254       while (p != NULL);
    255247    }
    256248  }
Note: See TracChangeset for help on using the changeset viewer.