Changeset af2ba9 in git
- Timestamp:
- Feb 21, 2007, 9:35:09 AM (16 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 70277379762db41e3a5a883007bbfa96f58a8be9
- Parents:
- 82244545f2799f63a8fa69c4b3834e3c23f6121c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
r822445 raf2ba9 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.14 2 2007-02-21 07:05:45bricken Exp $ */7 /* $Id: tgb.cc,v 1.143 2007-02-21 08:35:09 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 1865 1865 int modP_lastIndexRow(number* row,int ncols){ 1866 1866 int lastIndex; 1867 number zero=npInit(0); 1867 1868 for(lastIndex=ncols-1;lastIndex>=0;lastIndex--){ 1868 if (!( npIsZero(row[lastIndex]))){1869 if (!(row[lastIndex]==zero)){ 1869 1870 return lastIndex; 1870 1871 } … … 1911 1912 //assume rows "under r" have bigger or equal start index 1912 1913 number* row_array=rows[r]; 1913 1914 number zero=npInit(0); 1914 1915 int start=startIndices[r]; 1915 1916 number coef=row_array[start]; … … 1930 1931 if (coef2==minus_one){ 1931 1932 for(i=start;i<=lastIndex;i++){ 1932 other_row_array[i]=npSub(other_row_array[i], row_array[i]); 1933 if (row_array[i]!=zero) 1934 other_row_array[i]=npSubM(other_row_array[i], row_array[i]); 1933 1935 } 1934 1936 }else { 1935 1937 //assume(FALSE); 1936 1938 for(i=start;i<=lastIndex;i++){ 1939 if (row_array[i]!=zero) 1937 1940 other_row_array[i]=npAddM(npMult(coef2,row_array[i]),other_row_array[i]); 1938 1941 } … … 2040 2043 int start=startIndices[r]; 2041 2044 assume(start<ncols); 2042 2045 number zero=npInit(0); 2043 2046 number* row_array=rows[r]; 2044 2047 assume((!(npIsZero(row_array[start])))); … … 2061 2064 assume(start>startIndices[other_row]); 2062 2065 for(i=start;i<=lastIndex;i++){ 2063 other_row_array[i]=npAddM(npMult(coef,row_array[i]),other_row_array[i]); 2066 if (row_array[i]!=zero) 2067 other_row_array[i]=npAddM(npMult(coef,row_array[i]),other_row_array[i]); 2064 2068 } 2065 2069 updateLastReducibleIndex(other_row,r); … … 2113 2117 poly h=NULL; 2114 2118 int j; 2119 number zero=npInit(0); 2115 2120 for(j=tn-1;j>=0;j--){ 2116 if (!( npIsZero(row[j]))){2121 if (!(zero==(row[j]))){ 2117 2122 poly t=terms[j]; 2118 2123 t=p_LmInit(t,r); … … 3156 3161 } 3157 3162 #endif 3158 if (TEST_OPT_PROT)3159 Print("Evaluate Rows \n");3163 //if (TEST_OPT_PROT) 3164 // Print("Evaluate Rows \n"); 3160 3165 #ifndef NORO_NON_POLY 3161 3166 cache.evaluateRows();
Note: See TracChangeset
for help on using the changeset viewer.