Changeset 275397 in git


Ignore:
Timestamp:
Apr 8, 1998, 6:04:32 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
43ad8d3a0bac24e78153444638b76171714c3860
Parents:
af191b958ee3fe3243b1c9364cbf7700930e02ba
Message:
* hannes: fixes in kstdfac.cc kutil.cc kstd[12].cc


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

Legend:

Unmodified
Added
Removed
  • Singular/kstdfac.cc

    raf191b9 r275397  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstdfac.cc,v 1.15 1998-04-07 17:00:59 Singular Exp $ */
     4/* $Id: kstdfac.cc,v 1.16 1998-04-08 16:04:24 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: factorizing alg. of Buchberger
     
    464464    }
    465465    /* reduction of the element choosen from L */
    466     strat->red(&strat->P,strat);
     466    if (strat->P.p != NULL)
     467      strat->red(&strat->P,strat);
    467468    if (strat->P.p != NULL)
    468469    {
  • Singular/kutil.cc

    raf191b9 r275397  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.15 1998-04-06 17:59:32 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.16 1998-04-08 16:04:25 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for std
     
    200200*utilities for TSet, LSet
    201201*/
    202 inline intset initec (int maxnr)
     202inline static intset initec (int maxnr)
    203203{
    204204  return (intset)Alloc(maxnr*sizeof(int));
     
    434434
    435435/*2
    436 *cancels the i-th polynomial in the set
     436*cancels the j-th polynomial in the set
    437437*/
    438438void deleteInL (LSet set, int *length, int j,kStrategy strat)
     
    449449      /*- tail belongs to several int spolys -*/
    450450    }
    451     else pDelete(&(set[j].p));
     451    else
     452    {
     453      // search p in T, if it is there, do not delete it
     454      int i=strat->tl;
     455      poly p=set[j].p;
     456      while (i>=0)
     457      {
     458        if (strat->T[i].p==p)
     459        {
     460          p=NULL;
     461          break;
     462        }
     463        i--;
     464      }
     465      if (p!=NULL) pDelete(&p);
     466      set[j].p=NULL;
     467    } 
    452468  }
    453469  if ((*length)>0)
     
    33723388  if (strat->sl == IDELEMS(strat->Shdl)-1)
    33733389  {
    3374     strat->ecartS = (intset)ReAlloc(strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int),
     3390    strat->ecartS = (intset)ReAlloc(strat->ecartS,
     3391                                    IDELEMS(strat->Shdl)*sizeof(int),
    33753392                                    (IDELEMS(strat->Shdl)+setmax)*sizeof(int));
    33763393    if (strat->fromQ!=NULL)
    33773394    {
    3378       strat->fromQ = (intset)ReAlloc(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int),
     3395      strat->fromQ = (intset)ReAlloc(strat->fromQ,
     3396                                    IDELEMS(strat->Shdl)*sizeof(int),
    33793397                                    (IDELEMS(strat->Shdl)+setmax)*sizeof(int));
    33803398    }
  • Singular/maps.cc

    raf191b9 r275397  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: maps.cc,v 1.7 1998-01-12 18:59:50 obachman Exp $ */
     4/* $Id: maps.cc,v 1.8 1998-04-08 16:04:28 Singular Exp $ */
    55/*
    66* ABSTRACT - the mapping of polynomials to other rings
     
    199199  }
    200200  ordersize=i+1;
    201   wv = (short **) Alloc(ordersize * sizeof(short **));
    202   memset(wv,0,ordersize * sizeof(short **));
     201  wv = (short **) Alloc0(ordersize * sizeof(short **));
    203202  for (i--;i!=0 ;i--) wv[i+1] = sourcering->wvhdl[i];
    204203  tmpR = *currRing;
  • Singular/matpol.cc

    raf191b9 r275397  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: matpol.cc,v 1.9 1998-02-18 11:35:31 siebert Exp $ */
     4/* $Id: matpol.cc,v 1.10 1998-04-08 16:04:29 Singular Exp $ */
    55
    66/*
     
    6868    rc->m = (polyset)Alloc0(s);
    6969#endif
    70     if (rc->m==NULL)
    71     {
    72       Werror("internal error: creating matrix[%d][%d]",r,c);
    73       return NULL;
    74     }
     70    //if (rc->m==NULL)
     71    //{
     72    //  Werror("internal error: creating matrix[%d][%d]",r,c);
     73    //  return NULL;
     74    //}
    7575  }
    7676  return rc;
     
    725725  /* fill in the powers of x_var=h*/
    726726  poly h=pOne();
    727   for(k=1;k<=r; k++)
     727  for(k=r;k>0; k--)
    728728  {
    729729    MATELEM(m,k,k*(p+1))=pOne();
    730730  }
    731   for(l=1;l<=p; l++)
     731  for(l=p;l>0; l--)
    732732  {
    733733    pSetExp(h,var,l);
    734734    pSetm(h);
    735     for(k=1;k<=r; k++)
     735    for(k=r;k>0; k--)
    736736    {
    737737      MATELEM(m,k,k*(p+1)-l)=pCopy(h);
     
    892892row_col_weight::~row_col_weight()
    893893{
    894   if (ym)
     894  if (ym!=0)
    895895  {
    896896    Free((ADDRESS)wcol, yn*sizeof(float));
  • Singular/misc.cc

    raf191b9 r275397  
    719719              StringAppend("MDEBUG=%d,",MDEBUG);
    720720#endif
     721#ifdef PDEBUG
     722              StringAppend("PDEBUG,");
     723#endif
     724#ifdef KDEBUG
     725              StringAppend("KDEBUG,");
     726#endif
    721727#ifdef TEST_MAC_ORDER
    722728              StringAppendS("mac_order,");
  • Singular/polys.cc

    raf191b9 r275397  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys.cc,v 1.21 1998-04-08 12:42:17 pohl Exp $ */
     4/* $Id: polys.cc,v 1.22 1998-04-08 16:04:31 Singular Exp $ */
    55
    66/*
     
    728728  for (i=0;i<length;i++)
    729729  {
    730     if (actHeads[i])
     730    if (actHeads[i]!=NULL)
    731731    {
    732732      newOrder[i] = SchreyerOrd[pGetComp(actHeads[i])-1];
     
    772772  int i;
    773773  int* newOrder=
    774     (int*)Alloc((length+maxSchreyer-indexShift)*sizeof(int));
    775 
    776   for (i=0;i<length+maxSchreyer-indexShift;i++)
    777     newOrder[i]=0;
     774    (int*)Alloc0((length+maxSchreyer-indexShift)*sizeof(int));
     775
     776  //for (i=0;i<length+maxSchreyer-indexShift;i++)
     777  //  newOrder[i]=0;
    778778  for (i=indexShift;i<maxSchreyer;i++)
    779779  {
     
    832832    {
    833833      indexShift = comps;
    834       if (!indexShift) indexShift = 1;
     834      if (indexShift==0) indexShift = 1;
    835835      SchreyerOrd = (int*)Alloc((indexShift+length)*sizeof(int));
    836836      maxSchreyer = length+indexShift;
     
    17181718
    17191719/*2
     1720* returns TRUE if the head term of b is a multiple of the head term of a
     1721*/
     1722#if defined(macintosh)
     1723BOOLEAN pDivisibleBy(poly a, poly b)
     1724{
     1725  if ((a!=NULL)&&(( pGetComp(a)==0) || ( pGetComp(a) ==  pGetComp(b))))
     1726  {
     1727    int i=pVariables;
     1728    Exponent_t *e1=&( pGetExp(a,1));
     1729    Exponent_t *e2=&( pGetExp(b,1));
     1730    if ((*e1) > (*e2)) return FALSE;
     1731    do
     1732    {
     1733      i--;
     1734      if (i == 0) return TRUE;
     1735      e1++;
     1736      e2++;
     1737     } while ((*e1) <= (*e2));
     1738   }
     1739   return FALSE;
     1740}
     1741#endif
     1742
     1743
     1744/*2
    17201745* assumes that the head term of b is a multiple of the head term of a
    17211746* and return the multiplicant *m
     
    19081933  number  nn;
    19091934
    1910   P = (polyset)Alloc(5*sizeof(poly));
    1911   for (i=0; i<5; i++)
    1912   {
    1913     P[i] = NULL;
    1914   }
     1935  P = (polyset)Alloc0(5*sizeof(poly));
     1936  //for (i=0; i<5; i++)
     1937  //{
     1938  //  P[i] = NULL;
     1939  //}
    19151940  pCancelPolyByMonom(p1,p2,&P,&SizeOfSet);
    19161941  p = P[0];
  • Singular/sing_dbm.cc

    raf191b9 r275397  
    55//**************************************************************************/
    66//
    7 // $Id: sing_dbm.cc,v 1.8 1997-08-13 13:51:42 Singular Exp $
     7// $Id: sing_dbm.cc,v 1.9 1998-04-08 16:04:32 Singular Exp $
    88//
    99//**************************************************************************/
     
    5353    return TRUE;
    5454  }
    55   if (((db = (DBM_info *)Alloc(sizeof *db)) != NULL)
    56   &&((db->db = dbm_open(l->name, dbm_flags, 0664 )) != NULL ))
     55  //if (((db = (DBM_info *)Alloc(sizeof *db)) != NULL)
     56  //&&((db->db = dbm_open(l->name, dbm_flags, 0664 )) != NULL ))
     57  db = (DBM_info *)Alloc(sizeof *db);
     58  if((db->db = dbm_open(l->name, dbm_flags, 0664 )) != NULL )
    5759  {
    5860    db->first=1;
Note: See TracChangeset for help on using the changeset viewer.