Changeset 8fcfae in git
- Timestamp:
- Dec 2, 2013, 11:58:00 AM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
- Children:
- 11f9394e2a7861a265d30f1e798feea66f2d3973
- Parents:
- a7b37d65dd6d473a1bf5d915d9853076679013b0
- git-author:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-02 11:58:00+01:00
- git-committer:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:51:28+01:00
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd2.cc
ra7b37d r8fcfae 55 55 #define SBA_TAIL_RED 1 56 56 #define SBA_PRODUCT_CRITERION 0 57 #define SBA_PRINT_ZERO_REDUCTIONS 158 #define SBA_PRINT_REDUCTION_STEPS 159 #define SBA_PRINT_OPERATIONS 160 #define SBA_PRINT_SIZE_G 161 #define SBA_PRINT_SIZE_SYZ 157 #define SBA_PRINT_ZERO_REDUCTIONS 0 58 #define SBA_PRINT_REDUCTION_STEPS 0 59 #define SBA_PRINT_OPERATIONS 0 60 #define SBA_PRINT_SIZE_G 0 61 #define SBA_PRINT_SIZE_SYZ 0 62 62 #define SBA_PRINT_PRODUCT_CRITERION 0 63 63 … … 480 480 sba_interreduction_steps++; 481 481 #endif 482 #if SBA_PRINT_ REDUCTION_OPERATIONS482 #if SBA_PRINT_OPERATIONS 483 483 sba_interreduction_operations += pLength(strat->T[ii].p); 484 484 #endif … … 1816 1816 // 2. generation of new principal syzygy rules for syzCriterion 1817 1817 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax, 1818 1818 lrmax, reduc, Q, w, hilb ); 1819 1819 #endif 1820 1820 // initialize new syzygy rules for the next iteration step … … 1822 1822 } 1823 1823 /********************************************************************* 1824 * interrreduction step is done, we can go on with the next iteration1825 * step of the signature-based algorithm1826 ********************************************************************/1824 * interrreduction step is done, we can go on with the next iteration 1825 * step of the signature-based algorithm 1826 ********************************************************************/ 1827 1827 /* picks the last element from the lazyset L */ 1828 1828 strat->P = strat->L[strat->Ll]; 1829 1829 strat->Ll--; 1830 //#if 1 1830 /* reduction of the element choosen from L */ 1831 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat, strat->P.checked+1)) { 1832 //#if 1 1831 1833 #ifdef DEBUGF5 1832 Print("SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");1833 Print("-------------------------------------------------\n");1834 pWrite(strat->P.sig);1835 pWrite(pHead(strat->P.p));1836 pWrite(pHead(strat->P.p1));1837 pWrite(pHead(strat->P.p2));1838 Print("-------------------------------------------------\n");1839 #endif 1840 if (pNext(strat->P.p) == strat->tail)1841 {1842 // deletes the short spoly1834 Print("SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n"); 1835 Print("-------------------------------------------------\n"); 1836 pWrite(strat->P.sig); 1837 pWrite(pHead(strat->P.p)); 1838 pWrite(pHead(strat->P.p1)); 1839 pWrite(pHead(strat->P.p2)); 1840 Print("-------------------------------------------------\n"); 1841 #endif 1842 if (pNext(strat->P.p) == strat->tail) 1843 { 1844 // deletes the short spoly 1843 1845 #ifdef HAVE_RINGS 1844 if (rField_is_Ring(currRing)) 1845 pLmDelete(strat->P.p); 1846 if (rField_is_Ring(currRing)) 1847 pLmDelete(strat->P.p); 1848 else 1849 #endif 1850 pLmFree(strat->P.p); 1851 1852 // TODO: needs some masking 1853 // TODO: masking needs to vanish once the signature 1854 // sutff is completely implemented 1855 strat->P.p = NULL; 1856 poly m1 = NULL, m2 = NULL; 1857 1858 // check that spoly creation is ok 1859 while (strat->tailRing != currRing && 1860 !kCheckSpolyCreation(&(strat->P), strat, m1, m2)) 1861 { 1862 assume(m1 == NULL && m2 == NULL); 1863 // if not, change to a ring where exponents are at least 1864 // large enough 1865 if (!kStratChangeTailRing(strat)) 1866 { 1867 WerrorS("OVERFLOW..."); 1868 break; 1869 } 1870 } 1871 // create the real one 1872 ksCreateSpoly(&(strat->P), NULL, strat->use_buckets, 1873 strat->tailRing, m1, m2, strat->R); 1874 1875 } 1876 else if (strat->P.p1 == NULL) 1877 { 1878 if (strat->minim > 0) 1879 strat->P.p2=p_Copy(strat->P.p, currRing, strat->tailRing); 1880 // for input polys, prepare reduction 1881 strat->P.PrepareRed(strat->use_buckets); 1882 } 1883 1884 if (strat->P.p == NULL && strat->P.t_p == NULL) 1885 { 1886 red_result = 0; 1887 } 1846 1888 else 1847 #endif 1848 pLmFree(strat->P.p); 1849 1850 // TODO: needs some masking 1851 // TODO: masking needs to vanish once the signature 1852 // sutff is completely implemented 1853 strat->P.p = NULL; 1854 poly m1 = NULL, m2 = NULL; 1855 1856 // check that spoly creation is ok 1857 while (strat->tailRing != currRing && 1858 !kCheckSpolyCreation(&(strat->P), strat, m1, m2)) 1859 { 1860 assume(m1 == NULL && m2 == NULL); 1861 // if not, change to a ring where exponents are at least 1862 // large enough 1863 if (!kStratChangeTailRing(strat)) 1864 { 1865 WerrorS("OVERFLOW..."); 1866 break; 1867 } 1868 } 1869 // create the real one 1870 ksCreateSpoly(&(strat->P), NULL, strat->use_buckets, 1871 strat->tailRing, m1, m2, strat->R); 1872 1873 } 1874 else if (strat->P.p1 == NULL) 1875 { 1876 if (strat->minim > 0) 1877 strat->P.p2=p_Copy(strat->P.p, currRing, strat->tailRing); 1878 // for input polys, prepare reduction 1879 strat->P.PrepareRed(strat->use_buckets); 1880 } 1881 1882 if (strat->P.p == NULL && strat->P.t_p == NULL) 1883 { 1884 red_result = 0; 1885 } 1886 else 1887 { 1888 if (TEST_OPT_PROT) 1889 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(), 1890 &olddeg,&reduc,strat, red_result); 1891 1892 //#if 1 1889 { 1890 1891 //#if 1 1893 1892 #ifdef DEBUGF5 1894 Print("Poly before red: "); 1895 pWrite(pHead(strat->P.p)); 1896 pWrite(strat->P.sig); 1897 #endif 1898 /* reduction of the element choosen from L */ 1899 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat, strat->P.checked+1)) { 1893 Print("Poly before red: "); 1894 pWrite(pHead(strat->P.p)); 1895 pWrite(strat->P.sig); 1896 #endif 1900 1897 #if SBA_PRODUCT_CRITERION 1901 1898 if (strat->P.prd_crit) { … … 1909 1906 } 1910 1907 #else 1911 red_result = strat->red(&strat->P,strat); 1912 #endif 1913 } else { 1908 red_result = strat->red(&strat->P,strat); 1909 #endif 1910 } 1911 } else { 1914 1912 pDelete(&strat->P.sig); 1915 1913 if (strat->P.lcm!=NULL) … … 1918 1916 } 1919 1917 if (errorreported) break; 1920 }1921 1918 1922 1919 if (strat->overflow) -
kernel/kutil.cc
ra7b37d r8fcfae 5189 5189 while (strat->Ll > 0 && pLmEqual(strat->L[strat->Ll].sig,strat->P.sig)) 5190 5190 { 5191 // deletes the short spoly5192 #ifdef HAVE_RINGS5193 if (rField_is_Ring(currRing))5194 pLmDelete(strat->L[strat->Ll].p);5195 else5196 #endif5197 pLmFree(strat->L[strat->Ll].p);5198 5199 // TODO: needs some masking5200 // TODO: masking needs to vanish once the signature5201 // sutff is completely implemented5202 strat->L[strat->Ll].p = NULL;5203 poly m1 = NULL, m2 = NULL;5204 5205 // check that spoly creation is ok5206 while (strat->tailRing != currRing &&5207 !kCheckSpolyCreation(&(strat->L[strat->Ll]), strat, m1, m2))5208 {5209 assume(m1 == NULL && m2 == NULL);5210 // if not, change to a ring where exponents are at least5211 // large enough5212 if (!kStratChangeTailRing(strat))5213 {5214 WerrorS("OVERFLOW...");5215 break;5216 }5217 }5218 // create the real one5219 ksCreateSpoly(&(strat->L[strat->Ll]), NULL, strat->use_buckets,5220 strat->tailRing, m1, m2, strat->R);5221 5191 if (strat->P.GetLmCurrRing() == NULL) 5222 5192 { … … 5241 5211 { 5242 5212 pDelete(&strat->P.sig); 5243 strat->P.Delete();5244 5213 strat->P = strat->L[strat->Ll]; 5245 5214 strat->Ll--; … … 5247 5216 } 5248 5217 } 5218 poly p1 = pOne(); 5219 poly p2 = pOne(); 5249 5220 for (int ii=strat->sl; ii>-1; ii--) 5250 5221 { 5251 5222 if (p_LmShortDivisibleBy(strat->sig[ii], strat->sevSig[ii], strat->P.sig, ~strat->P.sevSig, currRing)) 5252 5223 { 5253 if (!(pLmCmp(ppMult_mm(strat->P.sig,pHead(strat->S[ii])),ppMult_mm(strat->sig[ii],strat->P.GetLmCurrRing())) == 1)) 5254 { 5255 strat->P.Delete(); 5224 p_ExpVectorSum(p1,strat->P.sig,strat->S[ii],currRing); 5225 p_ExpVectorSum(p2,strat->sig[ii],strat->P.p,currRing); 5226 if (!(pLmCmp(p1,p2) == 1)) 5227 { 5228 pDelete(&strat->P.sig); 5229 pDelete(&p1); 5230 pDelete(&p2); 5256 5231 return TRUE; 5257 5232 } 5258 5233 } 5259 5234 } 5235 pDelete(&p1); 5236 pDelete(&p2); 5260 5237 return FALSE; 5261 5238 }
Note: See TracChangeset
for help on using the changeset viewer.