Changeset d523f3 in git


Ignore:
Timestamp:
Mar 14, 2005, 5:17:07 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
a686c9c02d0bfc59b2d80093c2835e26db7d14be
Parents:
0b1cef8f45439b72a4d1a61eda044890a7780a7f
Message:
*hannes; id_Copy


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

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r0b1cef rd523f3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.6 2005-02-17 09:42:19 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.7 2005-03-14 16:17:07 Singular Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    331331#ifdef PDEBUG
    332332ideal idDBCopy(ideal h1,char *f,int l)
    333 #else
    334 ideal idCopy (ideal h1)
    335 #endif
    336333{
    337334  int i;
    338335  ideal h2;
    339336
    340 #ifdef PDEBUG
    341337  idDBTest(h1,PDEBUG,f,l);
    342 #endif
    343338//#ifdef TEST
    344339  if (h1 == NULL)
    345340  {
    346 #ifdef PDEBUG
    347341    h2=idDBInit(1,1,f,l);
    348 #else
    349     h2=idInit(1,1);
    350 #endif
    351342  }
    352343  else
    353344//#endif
    354345  {
    355 #ifdef PDEBUG
    356346    h2=idDBInit(IDELEMS(h1),h1->rank,f,l);
    357 #else
    358     h2=idInit(IDELEMS(h1),h1->rank);
    359 #endif
    360347    for (i=IDELEMS(h1)-1; i>=0; i--)
    361348      h2->m[i] = pCopy(h1->m[i]);
     349  }
     350  return h2;
     351}
     352#endif
     353
     354ideal id_Copy (ideal h1, const ring r)
     355{
     356  int i;
     357  ideal h2;
     358
     359//#ifdef TEST
     360  if (h1 == NULL)
     361  {
     362    h2=idInit(1,1);
     363  }
     364  else
     365//#endif
     366  {
     367    h2=idInit(IDELEMS(h1),h1->rank);
     368    for (i=IDELEMS(h1)-1; i>=0; i--)
     369      h2->m[i] = p_Copy(h1->m[i],r);
    362370  }
    363371  return h2;
  • kernel/ideals.h

    r0b1cef rd523f3  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: ideals.h,v 1.2 2004-07-16 08:43:00 Singular Exp $ */
     6/* $Id: ideals.h,v 1.3 2005-03-14 16:17:07 Singular Exp $ */
    77/*
    88* ABSTRACT - all basic methods to manipulate ideals
     
    4444#endif
    4545
     46ideal id_Copy (ideal h1,const ring r);
    4647#ifdef PDEBUG
    4748ideal idDBCopy(ideal h1,char *f,int l);
    4849#define idCopy(A) idDBCopy(A,__FILE__,__LINE__)
    4950#else
    50 ideal idCopy (ideal h1);
     51#define idCopy(A) id_Copy(A,currRing)
    5152#endif
    5253  /*adds two ideals without simplifying the result*/
Note: See TracChangeset for help on using the changeset viewer.