Changeset 275397 in git for Singular/polys.cc
- Timestamp:
- Apr 8, 1998, 6:04:32 PM (26 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 43ad8d3a0bac24e78153444638b76171714c3860
- Parents:
- af191b958ee3fe3243b1c9364cbf7700930e02ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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];
Note: See TracChangeset
for help on using the changeset viewer.