Changeset 69745c in git


Ignore:
Timestamp:
Feb 22, 2013, 5:24:56 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'cbf866d4f8c3861325311c042cb2033c053453b2')
Children:
3fe5653d30a5eb7c6185adb2fba661116e7cf0d85f737de70c628044e317187ef3d73f675c9b4aaf
Parents:
7964f9c956558e8b0001c238e40b87ea1f0d9757
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-02-22 17:24:56+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-02-22 18:24:51+01:00
Message:
Fixed walk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/walk_ip.cc

    r7964f9c r69745c  
    220220       ring almostDestRing=currRing;
    221221       rChangeCurrRing(destRing);
    222        destIdeal=idrMoveR(destIdeal,destRing,almostDestRing);
     222       destIdeal=idrMoveR(destIdeal, almostDestRing, destRing);
    223223     }
    224224
  • libpolys/polys/prCopy.cc

    r7964f9c r69745c  
    202202{
    203203  assume(src_r->cf==dest_r->cf);
     204  assume( prproc != NULL );
     205   
    204206  if (id == NULL) return NULL;
    205   ideal res = id;
    206 
    207   int i;
    208   for (i=IDELEMS(id)-1; i>=0; i--)
    209     res->m[i] = prproc(id->m[i], src_r, dest_r);
    210   id = NULL;
     207
     208  ideal res = id; id = NULL;
     209
     210  for (int i = IDELEMS(res) - 1; i >= 0; i--)
     211    res->m[i] = prproc(res->m[i], src_r, dest_r);
     212   
    211213  return res;
    212214}
  • libpolys/polys/prCopyTemplate.cc

    r7964f9c r69745c  
    88
    99static poly PR_NAME
    10 (poly &src, ring r_src, ring r_dest)
     10(poly &src, const ring r_src, const ring r_dest)
    1111{
    1212  if (src==NULL) return NULL;
     13
     14  /* PrintS("src: "); p_Write(src, r_src); PrintLn(); */
     15   
     16  //  p_Test(src, r_src); // may fail due to wrong monomial order
    1317  spolyrec dest_s;
     18   
    1419  poly dest = &dest_s;
    15   poly tmp;
    1620  PR_INIT_EVECTOR_COPY(r_src, r_dest);
    1721
    18   while (src != NULL)
     22  poly p = src; src = NULL;
     23  while (p != NULL)
    1924  {
    20     pNext(dest) = (poly) PR_ALLOC_MONOM(r_dest);
    21     pIter(dest);
    22     pSetCoeff0(dest, PR_NCOPY(pGetCoeff(src), r_src));
    23     PR_CPY_EVECTOR(dest, r_dest, src, r_src);
    24     tmp = pNext(src);
    25     PR_DELETE_MONOM(src, r_src);
    26     src = tmp;
     25    pNext(dest) = (poly) PR_ALLOC_MONOM(r_dest); pIter(dest);
     26     
     27    p_SetCoeff0(dest, PR_NCOPY(p_GetCoeff(p, r_src), r_src), r_dest);
     28    PR_CPY_EVECTOR(dest, r_dest, p, r_src);
     29     
     30    { poly tmp = pNext(p); PR_DELETE_MONOM(p, r_src); p = tmp; }
    2731  }
    2832  pNext(dest) = NULL;
Note: See TracChangeset for help on using the changeset viewer.