Changeset 275397 in git
- Timestamp:
- Apr 8, 1998, 6:04:32 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 43ad8d3a0bac24e78153444638b76171714c3860
- Parents:
- af191b958ee3fe3243b1c9364cbf7700930e02ba
- Location:
- Singular
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/kstdfac.cc
raf191b9 r275397 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstdfac.cc,v 1.1 5 1998-04-07 17:00:59Singular Exp $ */4 /* $Id: kstdfac.cc,v 1.16 1998-04-08 16:04:24 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: factorizing alg. of Buchberger … … 464 464 } 465 465 /* 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); 467 468 if (strat->P.p != NULL) 468 469 { -
Singular/kutil.cc
raf191b9 r275397 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.1 5 1998-04-06 17:59:32 obachmanExp $ */4 /* $Id: kutil.cc,v 1.16 1998-04-08 16:04:25 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for std … … 200 200 *utilities for TSet, LSet 201 201 */ 202 inline intset initec (int maxnr)202 inline static intset initec (int maxnr) 203 203 { 204 204 return (intset)Alloc(maxnr*sizeof(int)); … … 434 434 435 435 /*2 436 *cancels the i-th polynomial in the set436 *cancels the j-th polynomial in the set 437 437 */ 438 438 void deleteInL (LSet set, int *length, int j,kStrategy strat) … … 449 449 /*- tail belongs to several int spolys -*/ 450 450 } 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 } 452 468 } 453 469 if ((*length)>0) … … 3372 3388 if (strat->sl == IDELEMS(strat->Shdl)-1) 3373 3389 { 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), 3375 3392 (IDELEMS(strat->Shdl)+setmax)*sizeof(int)); 3376 3393 if (strat->fromQ!=NULL) 3377 3394 { 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), 3379 3397 (IDELEMS(strat->Shdl)+setmax)*sizeof(int)); 3380 3398 } -
Singular/maps.cc
raf191b9 r275397 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: maps.cc,v 1. 7 1998-01-12 18:59:50 obachmanExp $ */4 /* $Id: maps.cc,v 1.8 1998-04-08 16:04:28 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - the mapping of polynomials to other rings … … 199 199 } 200 200 ordersize=i+1; 201 wv = (short **) Alloc(ordersize * sizeof(short **)); 202 memset(wv,0,ordersize * sizeof(short **)); 201 wv = (short **) Alloc0(ordersize * sizeof(short **)); 203 202 for (i--;i!=0 ;i--) wv[i+1] = sourcering->wvhdl[i]; 204 203 tmpR = *currRing; -
Singular/matpol.cc
raf191b9 r275397 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: matpol.cc,v 1. 9 1998-02-18 11:35:31 siebertExp $ */4 /* $Id: matpol.cc,v 1.10 1998-04-08 16:04:29 Singular Exp $ */ 5 5 6 6 /* … … 68 68 rc->m = (polyset)Alloc0(s); 69 69 #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 //} 75 75 } 76 76 return rc; … … 725 725 /* fill in the powers of x_var=h*/ 726 726 poly h=pOne(); 727 for(k= 1;k<=r; k++)727 for(k=r;k>0; k--) 728 728 { 729 729 MATELEM(m,k,k*(p+1))=pOne(); 730 730 } 731 for(l= 1;l<=p; l++)731 for(l=p;l>0; l--) 732 732 { 733 733 pSetExp(h,var,l); 734 734 pSetm(h); 735 for(k= 1;k<=r; k++)735 for(k=r;k>0; k--) 736 736 { 737 737 MATELEM(m,k,k*(p+1)-l)=pCopy(h); … … 892 892 row_col_weight::~row_col_weight() 893 893 { 894 if (ym )894 if (ym!=0) 895 895 { 896 896 Free((ADDRESS)wcol, yn*sizeof(float)); -
Singular/misc.cc
raf191b9 r275397 719 719 StringAppend("MDEBUG=%d,",MDEBUG); 720 720 #endif 721 #ifdef PDEBUG 722 StringAppend("PDEBUG,"); 723 #endif 724 #ifdef KDEBUG 725 StringAppend("KDEBUG,"); 726 #endif 721 727 #ifdef TEST_MAC_ORDER 722 728 StringAppendS("mac_order,"); -
Singular/polys.cc
raf191b9 r275397 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1.2 1 1998-04-08 12:42:17 pohlExp $ */4 /* $Id: polys.cc,v 1.22 1998-04-08 16:04:31 Singular Exp $ */ 5 5 6 6 /* … … 728 728 for (i=0;i<length;i++) 729 729 { 730 if (actHeads[i] )730 if (actHeads[i]!=NULL) 731 731 { 732 732 newOrder[i] = SchreyerOrd[pGetComp(actHeads[i])-1]; … … 772 772 int i; 773 773 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; 778 778 for (i=indexShift;i<maxSchreyer;i++) 779 779 { … … 832 832 { 833 833 indexShift = comps; 834 if ( !indexShift) indexShift = 1;834 if (indexShift==0) indexShift = 1; 835 835 SchreyerOrd = (int*)Alloc((indexShift+length)*sizeof(int)); 836 836 maxSchreyer = length+indexShift; … … 1718 1718 1719 1719 /*2 1720 * returns TRUE if the head term of b is a multiple of the head term of a 1721 */ 1722 #if defined(macintosh) 1723 BOOLEAN 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 1720 1745 * assumes that the head term of b is a multiple of the head term of a 1721 1746 * and return the multiplicant *m … … 1908 1933 number nn; 1909 1934 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 //} 1915 1940 pCancelPolyByMonom(p1,p2,&P,&SizeOfSet); 1916 1941 p = P[0]; -
Singular/sing_dbm.cc
raf191b9 r275397 5 5 //**************************************************************************/ 6 6 // 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 $ 8 8 // 9 9 //**************************************************************************/ … … 53 53 return TRUE; 54 54 } 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 ) 57 59 { 58 60 db->first=1;
Note: See TracChangeset
for help on using the changeset viewer.