Changeset 32f7e5 in git
- Timestamp:
- Dec 5, 2013, 8:41:29 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0c15dc1d046c89a6a771b4f899e787a85af175ce
- Parents:
- 88bb8861e1718d85807ce45f043eba5c778545e1
- git-author:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-05 20:41:29+01:00
- git-committer:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:51:29+01:00
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kInline.h
r88bb88 r32f7e5 1156 1156 // dummy function for function pointer strat->rewCrit being usable in all 1157 1157 // possible choices for criteria 1158 KINLINE BOOLEAN arriRewDummy(poly /*sig*/, unsigned long /*not_sevSig*/, kStrategy /*strat*/, int /*start=0*/)1158 KINLINE BOOLEAN arriRewDummy(poly /*sig*/, unsigned long /*not_sevSig*/, poly /*lm*/, kStrategy /*strat*/, int /*start=0*/) 1159 1159 { 1160 1160 return FALSE; -
kernel/kstd1.cc
r88bb88 r32f7e5 2268 2268 strat->rewCrit1 = arriRewDummy; 2269 2269 strat->rewCrit2 = arriRewCriterion; 2270 strat->rewCrit3 = arriRewCriterionPre; 2270 2271 } 2271 2272 else … … 2273 2274 strat->rewCrit1 = faugereRewCriterion; 2274 2275 strat->rewCrit2 = faugereRewCriterion; 2276 strat->rewCrit3 = faugereRewCriterion; 2275 2277 } 2276 2278 -
kernel/kstd2.cc
r88bb88 r32f7e5 1821 1821 // initialize new syzygy rules for the next iteration step 1822 1822 initSyzRules(strat); 1823 1823 1824 } 1824 1825 /********************************************************************* … … 1831 1832 /* reduction of the element choosen from L */ 1832 1833 1833 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat , strat->P.checked+1)) {1834 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat->P.GetLmCurrRing(), strat, strat->P.checked+1)) { 1834 1835 //#if 1 1835 1836 #ifdef DEBUGF5 … … 1899 1900 if (strat->P.prd_crit) { 1900 1901 product_criterion++; 1901 enterSyz(strat->P, strat); 1902 int pos = posInSyz(strat, strat->P.sig); 1903 enterSyz(strat->P, strat, pos); 1902 1904 if (strat->P.lcm!=NULL) 1903 1905 pLmFree(strat->P.lcm); … … 2112 2114 //#if 1 2113 2115 #if DEBUGF50 2114 printf("---------------------------\n");2116 //printf("---------------------------\n"); 2115 2117 Print(" %d. ELEMENT ADDED TO GCURR:\n",strat->sl+1); 2116 2118 Print("LEAD POLY: "); pWrite(pHead(strat->S[strat->sl])); … … 2157 2159 zeroreductions++; 2158 2160 #endif 2159 enterSyz(strat->P,strat); 2161 int pos = posInSyz(strat, strat->P.sig); 2162 enterSyz(strat->P, strat, pos); 2160 2163 //#if 1 2161 2164 #ifdef DEBUGF5 … … 2223 2226 #endif 2224 2227 #if SBA_PRINT_SIZE_SYZ 2225 size_syz = strat->syzl+1;2226 #endif 2227 2228 // that is correct, syzl is counting one too far 2229 size_syz = strat->syzl; 2230 #endif 2228 2231 exitSba(strat); 2229 2232 // if (TEST_OPT_WEIGHTM) -
kernel/kutil.cc
r88bb88 r32f7e5 987 987 memmove(&(strat->sevSig[i]),&(strat->sevSig[i+1]),(strat->sl - i)*sizeof(unsigned long)); 988 988 memmove(&(strat->S_2_R[i]),&(strat->S_2_R[i+1]),(strat->sl - i)*sizeof(int)); 989 memmove(&(strat->fromS[i]),&(strat->fromS[i+1]),(strat->sl - i)*sizeof(int));990 989 #else 991 990 int j; … … 998 997 strat->sevSig[j] = strat->sevSig[j+1]; 999 998 strat->S_2_R[j] = strat->S_2_R[j+1]; 1000 strat->fromS[j] = strat->fromS[j+1];1001 999 } 1002 1000 #endif … … 1045 1043 #endif 1046 1044 pLmFree(set[j].lcm); 1045 } 1046 if (set[j].sig!=NULL) 1047 { 1048 #ifdef HAVE_RINGS 1049 if (pGetCoeff(set[j].sig) != NULL) 1050 pLmDelete(set[j].sig); 1051 else 1052 #endif 1053 pLmFree(set[j].sig); 1047 1054 } 1048 1055 if (set[j].p!=NULL) … … 1779 1786 // the corresponding signatures for criteria checks 1780 1787 LObject Lp; 1781 // poly last;1782 1788 poly pSigMult = p_Copy(pSig,currRing); 1783 1789 poly sSigMult = p_Copy(strat->sig[i],currRing); … … 1806 1812 Print("P1 "); 1807 1813 pWrite(pHead(p)); 1808 Print("FROM: %d\n", from);1809 1814 Print("P2 "); 1810 1815 pWrite(pHead(strat->S[i])); 1811 Print("FROM: %d\n", strat->fromS[i]);1812 1816 Print("M1 "); 1813 1817 pWrite(m1); … … 1827 1831 pWrite(sSigMult); 1828 1832 Print("----------------\n"); 1829 #endif 1830 // testing by syzCrit = F5 Criterion 1831 // testing by rewCrit1 = Rewritten Criterion 1832 if ( strat->syzCrit(pSigMult,pSigMultNegSev,strat) || 1833 strat->syzCrit(sSigMult,sSigMultNegSev,strat) 1834 || strat->rewCrit1(sSigMult,sSigMultNegSev,strat,i+1) 1835 ) 1836 { 1837 pDelete(&pSigMult); 1838 pDelete(&sSigMult); 1839 strat->cp++; 1840 pLmFree(Lp.lcm); 1841 Lp.lcm=NULL; 1842 pDelete (&m1); 1843 pDelete (&m2); 1844 return; 1845 } 1846 // in any case Lp is checked up to the next strat->P which is added 1847 // to S right after this critical pair creation. 1848 // NOTE: this even holds if the 2nd generator gives the bigger signature 1849 // moreover, this improves rewCriterion, 1850 // i.e. strat->checked > strat->from if and only if the 2nd generator 1851 // gives the bigger signature. 1852 Lp.checked = strat->sl+1; 1833 Lp.checked = 0; 1834 #endif 1853 1835 int sigCmp = p_LmCmp(pSigMult,sSigMult,currRing); 1854 1836 //#if 1 … … 1862 1844 // printf("!!!! EQUAL SIGS !!!!\n"); 1863 1845 // pSig = sSig, delete element due to Rewritten Criterion 1864 strat->cp++;1865 1846 pDelete(&pSigMult); 1866 1847 pDelete(&sSigMult); … … 1871 1852 return; 1872 1853 } 1873 // at this point it is clear that the pair will be added to L, since it has 1874 // passed all tests up to now 1875 1876 // store from which element this pair comes from for further tests 1877 Lp.from = strat->sl+1; 1878 if(sigCmp==currRing->OrdSgn) 1879 { 1880 // pSig > sSig 1881 pDelete (&sSigMult); 1882 Lp.sig = pSigMult; 1883 Lp.sevSig = ~pSigMultNegSev; 1884 } 1885 else 1886 { 1887 // pSig < sSig 1888 pDelete (&pSigMult); 1889 Lp.sig = sSigMult; 1890 Lp.sevSig = ~sSigMultNegSev; 1891 } 1892 // adds buchberger's first criterion 1893 if (pLmCmp(m2,pHead(p)) == 0) { 1894 Lp.prod_crit = TRUE; // Product Criterion 1895 #if 0 1896 enterSyz(Lp, strat); 1854 // testing by syzCrit = F5 Criterion 1855 // testing by rewCrit1 = Rewritten Criterion 1856 // NOTE: Arri's Rewritten Criterion is tested below, we need Lp.p for it! 1857 if ( strat->syzCrit(pSigMult,pSigMultNegSev,strat) || 1858 strat->syzCrit(sSigMult,sSigMultNegSev,strat) 1859 || strat->rewCrit1(sSigMult,sSigMultNegSev,Lp.lcm,strat,i+1) 1860 ) 1861 { 1862 pDelete(&pSigMult); 1863 pDelete(&sSigMult); 1864 pLmFree(Lp.lcm); 1897 1865 Lp.lcm=NULL; 1898 1866 pDelete (&m1); 1899 1867 pDelete (&m2); 1900 1868 return; 1901 #endif 1902 } 1903 pDelete (&m1); 1904 pDelete (&m2); 1905 #if DEBUGF5 1906 printf("SIGNATURE OF PAIR: "); 1907 pWrite(Lp.sig); 1908 #endif 1869 } 1909 1870 /* 1910 1871 *the pair (S[i],p) enters B if the spoly != 0 … … 1985 1946 } 1986 1947 } 1948 // store from which element this pair comes from for further tests 1949 //Lp.from = strat->sl+1; 1950 if(sigCmp==currRing->OrdSgn) 1951 { 1952 // pSig > sSig 1953 pDelete (&sSigMult); 1954 Lp.sig = pSigMult; 1955 Lp.sevSig = ~pSigMultNegSev; 1956 } 1957 else 1958 { 1959 // pSig < sSig 1960 pDelete (&pSigMult); 1961 Lp.sig = sSigMult; 1962 Lp.sevSig = ~sSigMultNegSev; 1963 } 1987 1964 if (Lp.p == NULL) 1988 1965 { 1989 /*- the case that the s-poly is 0 -*/1990 if (strat->pairtest==NULL) initPairtest(strat);1991 strat->pairtest[i] = TRUE;/*- hint for spoly(S^[i],p)=0 -*/1992 strat->pairtest[strat->sl+1] = TRUE;1993 /*hint for spoly(S[i],p) == 0 for some i,0 <= i <= sl*/1994 /*1995 *suppose we have (s,r),(r,p),(s,p) and spoly(s,p) == 0 and (r,p) is1996 *still in B (i.e. lcm(r,p) == lcm(s,p) or the leading term of s does not1997 *devide lcm(r,p)). In the last case (s,r) can be canceled if the leading1998 *term of p devides the lcm(s,r)1999 *(this canceling should be done here because2000 *the case lcm(s,p) == lcm(s,r) is not covered in chainCrit)2001 *the first case is handeled in chainCrit2002 */2003 1966 if (Lp.lcm!=NULL) pLmFree(Lp.lcm); 2004 1967 } 2005 1968 else 2006 1969 { 1970 // testing by rewCrit3 = Arris Rewritten Criterion (for F5 nothing happens!) 1971 if (strat->rewCrit3(Lp.sig,~Lp.sevSig,Lp.p,strat,strat->sl+1)) { 1972 pLmFree(Lp.lcm); 1973 pDelete(&Lp.sig); 1974 Lp.lcm=NULL; 1975 pDelete (&m1); 1976 pDelete (&m2); 1977 return; 1978 } 1979 // in any case Lp is checked up to the next strat->P which is added 1980 // to S right after this critical pair creation. 1981 // NOTE: this even holds if the 2nd generator gives the bigger signature 1982 // moreover, this improves rewCriterion, 1983 // i.e. strat->checked > strat->from if and only if the 2nd generator 1984 // gives the bigger signature. 1985 Lp.checked = strat->sl+1; 1986 // at this point it is clear that the pair will be added to L, since it has 1987 // passed all tests up to now 1988 1989 // adds buchberger's first criterion 1990 if (pLmCmp(m2,pHead(p)) == 0) { 1991 Lp.prod_crit = TRUE; // Product Criterion 1992 #if 0 1993 int pos = posInSyz(Lp.sig); 1994 enterSyz(Lp, strat,pos); 1995 Lp.lcm=NULL; 1996 pDelete (&m1); 1997 pDelete (&m2); 1998 return; 1999 #endif 2000 } 2001 pDelete (&m1); 2002 pDelete (&m2); 2003 #if DEBUGF5 2004 printf("SIGNATURE OF PAIR: "); 2005 pWrite(Lp.sig); 2006 #endif 2007 2007 /*- the pair (S[i],p) enters B -*/ 2008 2008 Lp.p1 = strat->S[i]; … … 4631 4631 } 4632 4632 4633 // for sba, sorting syzygies 4634 int posInSyz (const kStrategy strat, poly sig) 4635 { 4636 if (strat->syzl==0) return 0; 4637 if (pLmCmp(strat->syz[strat->syzl-1],sig) != currRing->OrdSgn) 4638 return strat->syzl; 4639 4640 int i; 4641 int an = 0; 4642 int en= strat->syzl-1; 4643 loop 4644 { 4645 if (an >= en-1) 4646 { 4647 if (pLmCmp(strat->syz[an],sig) != currRing->OrdSgn) return en; 4648 return an; 4649 } 4650 i=(an+en) / 2; 4651 if (pLmCmp(strat->syz[i],sig) != currRing->OrdSgn) an=i; 4652 else en=i; 4653 /*aend. fuer lazy == in !=- machen */ 4654 } 4655 } 4656 4633 4657 /*2 4634 4658 * … … 5078 5102 return TRUE; 5079 5103 } 5104 //k++; 5080 5105 } 5081 5106 return FALSE; … … 5119 5144 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing)) 5120 5145 return TRUE; 5146 //k++; 5121 5147 } 5122 5148 return FALSE; … … 5127 5153 * REWRITTEN CRITERION for signature-based standard basis algorithms 5128 5154 */ 5129 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start=0)5155 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly /*lm*/, kStrategy strat, int start=0) 5130 5156 { 5131 5157 //printf("Faugere Rewritten Criterion\n"); … … 5135 5161 pWrite(sig); 5136 5162 #endif 5137 //for(int k = start; k<strat->sl+1; k++)5138 5163 for(int k = strat->sl; k>start; k--) 5139 5164 { … … 5145 5170 #endif 5146 5171 if (p_LmShortDivisibleBy(strat->sig[k], strat->sevSig[k], sig, not_sevSig, currRing)) 5147 //if (p_LmEqual(strat->sig[k], sig, currRing))5148 5172 { 5149 5173 //#if 1 … … 5153 5177 return TRUE; 5154 5178 } 5179 //k--; 5155 5180 } 5156 5181 #ifdef DEBUGF5 … … 5184 5209 // critical pair. In this situation we can discard the critical pair 5185 5210 // completely. 5186 BOOLEAN arriRewCriterion(poly /*sig*/, unsigned long /*not_sevSig*/, kStrategy strat, int /*start=0*/)5187 { 5188 //printf("Arri Rewritten Criterion\n");5189 while (strat->Ll > 0 && pLmEqual(strat->L[strat->Ll].sig,strat->P.sig))5190 {5191 /*5192 if ( strat->P.GetLmCurrRing() == NULL)5193 { 5194 p rintf("---\n");5195 p Write(strat->P.GetLmCurrRing());5196 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);5197 }5198 */5199 /*5200 if (strat->L[strat->Ll].GetLmCurrRing() == NULL)5201 {5202 printf("---\n");5203 pDelete(&strat->P.sig);5204 strat->P.Delete();5205 strat->P = strat->L[strat->Ll];5206 strat->Ll--;5207 5208 */ 5209 if ((strat->P.GetLmCurrRing() != NULL)5210 && (strat->L[strat->Ll].GetLmCurrRing() != NULL)) 5211 {5212 if (pLmCmp(strat->P.GetLmCurrRing(),strat->L[strat->Ll].GetLmCurrRing()) == -1)5213 5214 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);5215 }5216 else5217 {5218 pDelete(&strat->P.sig);5219 //strat->P.Delete();5220 strat->P = strat->L[strat->Ll];5221 strat->Ll--;5222 }5211 BOOLEAN arriRewCriterion(poly /*sig*/, unsigned long /*not_sevSig*/, poly /*lm*/, kStrategy strat, int start=0) 5212 { 5213 poly p1 = pOne(); 5214 poly p2 = pOne(); 5215 for (int ii=strat->sl; ii>start; ii--) 5216 { 5217 if (p_LmShortDivisibleBy(strat->sig[ii], strat->sevSig[ii], strat->P.sig, ~strat->P.sevSig, currRing)) 5218 { 5219 p_ExpVectorSum(p1,strat->P.sig,strat->S[ii],currRing); 5220 p_ExpVectorSum(p2,strat->sig[ii],strat->P.p,currRing); 5221 if (!(pLmCmp(p1,p2) == 1)) 5222 { 5223 pDelete(&p1); 5224 pDelete(&p2); 5225 return TRUE; 5226 } 5227 } 5228 } 5229 pDelete(&p1); 5230 pDelete(&p2); 5231 return FALSE; 5232 } 5233 5234 BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int /*start=0*/) 5235 { 5236 int found = -1; 5237 for (int i=strat->Bl; i>-1; i--) { 5238 if (pLmEqual(strat->B[i].sig,sig)) { 5239 found = i; 5240 break; 5241 } 5242 } 5243 if (found != -1) { 5244 if (pLmCmp(lm,strat->B[found].GetLmCurrRing()) == -1) { 5245 deleteInL(strat->B,&strat->Bl,found,strat); 5246 } else { 5247 return TRUE; 5223 5248 } 5224 5249 } … … 5227 5252 for (int ii=strat->sl; ii>-1; ii--) 5228 5253 { 5229 if (p_LmShortDivisibleBy(strat->sig[ii], strat->sevSig[ii], s trat->P.sig, ~strat->P.sevSig, currRing))5230 { 5231 p_ExpVectorSum(p1,s trat->P.sig,strat->S[ii],currRing);5232 p_ExpVectorSum(p2,strat->sig[ii], strat->P.p,currRing);5254 if (p_LmShortDivisibleBy(strat->sig[ii], strat->sevSig[ii], sig, not_sevSig, currRing)) 5255 { 5256 p_ExpVectorSum(p1,sig,strat->S[ii],currRing); 5257 p_ExpVectorSum(p2,strat->sig[ii],lm,currRing); 5233 5258 if (!(pLmCmp(p1,p2) == 1)) 5234 5259 { 5235 pDelete(&strat->P.sig);5236 //strat->P.Delete();5237 5260 pDelete(&p1); 5238 5261 pDelete(&p2); … … 5916 5939 else i=setmaxT; 5917 5940 strat->ecartS = initec(i); 5918 strat->fromS = initec(i);5919 5941 strat->sevS = initsevS(i); 5920 5942 strat->sevSig = initsevS(i); … … 6131 6153 { 6132 6154 poly p = pOne(); 6133 p Lcm(strat->S[k],strat->S[i],p);6155 p_ExpVectorCopy(p,strat->S[k],currRing); 6134 6156 strat->syz[ctr] = p; 6135 6157 p_SetCompP (strat->syz[ctr], comp, currRing); 6136 6158 poly q = p_Copy(p, currRing); 6159 p_ExpVectorCopy(q,strat->S[i],currRing); 6137 6160 q = p_Neg (q, currRing); 6138 6161 p_SetCompP (q, p_GetComp(strat->sig[k], currRing), currRing); 6139 6162 strat->syz[ctr] = p_Add_q (strat->syz[ctr], q, currRing); 6140 6163 #if defined(DEBUGF5) || defined(DEBUGF51) 6164 //#if 1 6165 printf(". . \n"); 6141 6166 pWrite(strat->syz[ctr]); 6142 6167 #endif … … 6169 6194 for (k = 0; k<strat->sl+1; k++) 6170 6195 { 6171 strat->syz[ctr] = p_Copy (pHead(strat->S[k]), currRing); 6196 poly p = pOne(); 6197 p_ExpVectorCopy(p,strat->S[k],currRing); 6198 strat->syz[ctr] = p; 6172 6199 p_SetCompP (strat->syz[ctr], comp, currRing); 6173 poly q = p_Copy (pHead(strat->L[strat->Ll].p), currRing); 6200 poly q = p_Copy(p, currRing); 6201 p_ExpVectorCopy(q,strat->L[strat->Ll].p,currRing); 6174 6202 q = p_Neg (q, currRing); 6175 6203 p_SetCompP (q, p_GetComp(strat->sig[k], currRing), currRing); … … 6186 6214 #ifdef DEBUGF5 6187 6215 Print("Principal syzygies:\n"); 6216 printf("syzl %d\n",strat->syzl); 6217 printf("syzmax %d\n",strat->syzmax); 6218 printf("ps %d\n",ps); 6188 6219 Print("--------------------------------\n"); 6189 6220 for(i=0;i<=ps-1;i++) … … 6354 6385 else i=setmaxT; 6355 6386 i=((i+IDELEMS(F)+IDELEMS(P)+15)/16)*16; 6356 strat->fromS=initec(i);6357 6387 strat->sevS=initsevS(i); 6358 6388 strat->sevSig=initsevS(i); … … 7011 7041 (IDELEMS(strat->Shdl)+setmaxTinc) 7012 7042 *sizeof(int)); 7013 strat->fromS = (intset)omReallocSize(strat->fromS,7014 IDELEMS(strat->Shdl)*sizeof(int),7015 (IDELEMS(strat->Shdl)+setmaxTinc)7016 *sizeof(int));7017 7043 strat->S_2_R = (int*) omRealloc0Size(strat->S_2_R, 7018 7044 IDELEMS(strat->Shdl)*sizeof(int), … … 7051 7077 memmove(&(strat->ecartS[atS+1]), &(strat->ecartS[atS]), 7052 7078 (strat->sl - atS + 1)*sizeof(int)); 7053 memmove(&(strat->fromS[atS+1]), &(strat->fromS[atS]),7054 (strat->sl - atS + 1)*sizeof(int));7055 7079 memmove(&(strat->sevS[atS+1]), &(strat->sevS[atS]), 7056 7080 (strat->sl - atS + 1)*sizeof(unsigned long)); … … 7068 7092 strat->S[i] = strat->S[i-1]; 7069 7093 strat->ecartS[i] = strat->ecartS[i-1]; 7070 strat->fromS[i] = strat->fromS[i-1];7071 7094 strat->sevS[i] = strat->sevS[i-1]; 7072 7095 strat->S_2_R[i] = strat->S_2_R[i-1]; … … 7115 7138 } 7116 7139 strat->ecartS[atS] = p.ecart; 7117 strat->fromS[atS] = p.from;7118 7140 strat->S_2_R[atS] = atR; 7119 7141 strat->sl++; … … 7201 7223 } 7202 7224 7225 7203 7226 /*2 7204 7227 * puts signature p.sig to the set syz 7205 7228 */ 7206 void enterSyz(LObject p, kStrategy strat) 7207 { 7208 int i = strat->syzl; 7209 7229 void enterSyz(LObject p, kStrategy strat, int atT) 7230 { 7231 int i; 7210 7232 strat->newt = TRUE; 7211 7233 if (strat->syzl == strat->syzmax) … … 7218 7240 strat->syzmax += setmaxTinc; 7219 7241 } 7242 if (atT < strat->syzl-1) 7243 { 7244 #ifdef ENTER_USE_MEMMOVE 7245 memmove(&(strat->syz[atT+1]), &(strat->syz[atT]), 7246 (strat->syzl-atT+1)*sizeof(poly)); 7247 memmove(&(strat->sevSyz[atT+1]), &(strat->sevSyz[atT]), 7248 (strat->syzl-atT+1)*sizeof(unsigned long)); 7249 #endif 7250 for (i=strat->syzl; i>=atT+1; i--) 7251 { 7252 #ifndef ENTER_USE_MEMMOVE 7253 strat->syz[i] = strat->syz[i-1]; 7254 strat->sevSyz[i] = strat->sevSyz[i-1]; 7255 #endif 7256 } 7257 } 7258 i = strat->syzl; 7259 //i = atT; 7220 7260 strat->syz[i] = p.sig; 7221 7261 strat->sevSyz[i] = p.sevSig; … … 7229 7269 while (cc>-1) 7230 7270 { 7231 if (p_LmShortDivisibleBy( strat->syz[ strat->syzl-1], strat->sevSyz[strat->syzl-1],7271 if (p_LmShortDivisibleBy( strat->syz[atT], strat->sevSyz[atT], 7232 7272 strat->L[cc].sig, ~strat->L[cc].sevSig, currRing)) 7233 7273 { … … 7236 7276 cc--; 7237 7277 } 7238 7239 7278 } 7240 7279 … … 7747 7786 omFreeSize(strat->sevT, (strat->tmax)*sizeof(unsigned long)); 7748 7787 omFreeSize(strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int)); 7749 omFreeSize(strat->fromS,IDELEMS(strat->Shdl)*sizeof(int));7750 7788 omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long)); 7751 7789 omFreeSize((ADDRESS)strat->sevSig,IDELEMS(strat->Shdl)*sizeof(unsigned long)); -
kernel/kutil.h
r88bb88 r32f7e5 180 180 public: 181 181 unsigned long sev; 182 unsigned long from; // from which polynomial it comes from 183 // this is important for signature-based 184 // algorithms 182 unsigned long from; // index in sig up to which the correspongin LObject was already checked 185 183 unsigned long checked; // this is the index of S up to which 186 184 // the corresponding LObject was already checked in … … 290 288 void (*chainCrit) (poly p,int ecart,kStrategy strat); 291 289 BOOLEAN (*syzCrit) (poly sig, unsigned long not_sevSig, kStrategy strat); 292 BOOLEAN (*rewCrit1) (poly sig, unsigned long not_sevSig, kStrategy strat, int start /*= 0*/); 293 BOOLEAN (*rewCrit2) (poly sig, unsigned long not_sevSig, kStrategy strat, int start /*= 0*/); 290 BOOLEAN (*rewCrit1) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/); 291 BOOLEAN (*rewCrit2) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/); 292 BOOLEAN (*rewCrit3) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/); 294 293 pFDegProc pOrigFDeg; 295 294 pLDegProc pOrigLDeg; … … 447 446 int posInLSig (const LSet set, const int length, 448 447 LObject* L,const kStrategy strat); 448 int posInSyz (const kStrategy strat, const poly sig); 449 449 int posInL0 (const LSet set, const int length, 450 450 LObject* L,const kStrategy strat); … … 521 521 void initSyzRules (kStrategy strat); 522 522 void updateS(BOOLEAN toT,kStrategy strat); 523 void enterSyz (LObject p,kStrategy strat );523 void enterSyz (LObject p,kStrategy strat, int atT); 524 524 void enterT (LObject p,kStrategy strat, int atT = -1); 525 525 void cancelunit (LObject* p,BOOLEAN inNF=FALSE); … … 545 545 BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat); 546 546 BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat); 547 KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 548 BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 549 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 547 KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start); 548 BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start); 549 BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start); 550 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start); 550 551 BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 551 552 // returns index of p in TSet, or -1 if not found
Note: See TracChangeset
for help on using the changeset viewer.