| 1813 | } |
| 1814 | |
| 1815 | void initMora(ideal F,kStrategy strat) |
| 1816 | { |
| 1817 | int i,j; |
| 1818 | |
| 1819 | strat->NotUsedAxis = (BOOLEAN *)omAlloc(((currRing->N)+1)*sizeof(BOOLEAN)); |
| 1820 | for (j=(currRing->N); j>0; j--) strat->NotUsedAxis[j] = TRUE; |
| 1821 | strat->enterS = enterSMora; |
| 1822 | strat->initEcartPair = initEcartPairMora; /*- ecart approximation -*/ |
| 1823 | strat->posInLOld = strat->posInL; |
| 1824 | strat->posInLOldFlag = TRUE; |
| 1825 | strat->initEcart = initEcartNormal; |
| 1826 | strat->kAllAxis = (currRing->ppNoether) != NULL; |
| 1827 | if ( strat->kAllAxis ) |
| 1828 | { |
| 1829 | strat->kNoether = pCopy((currRing->ppNoether)); |
| 1830 | strat->red = redFirst; /*take the first possible in T*/ |
| 1831 | if (TEST_OPT_PROT) |
| 1832 | { |
| 1833 | Print("H(%ld)",p_FDeg(strat->kNoether,currRing)+1); |
| 1834 | mflush(); |
| 1835 | } |
| 1836 | } |
| 1837 | else if (strat->homog) |
| 1838 | strat->red = redFirst; /*take the first possible in T*/ |
| 1839 | else |
| 1840 | strat->red = redEcart;/*take the first possible in under ecart-restriction*/ |
| 1841 | if (strat->kAllAxis) |
| 1842 | { |
| 1843 | HCord = currRing->pFDeg((strat->kNoether),currRing)+1; |
| 1844 | } |
| 1845 | else |
| 1846 | { |
| 1847 | HCord = 32000;/*- very large -*/ |
| 1848 | } |
| 1849 | |
| 1850 | if (rField_is_Ring(currRing)) |
| 1851 | { |
| 1852 | if (rField_is_Z(currRing)) |
| 1853 | strat->red = redRiloc_Z; |
| 1854 | else |
| 1855 | strat->red = redRiloc; |
| 1856 | } |
| 1857 | |
| 1858 | /*reads the ecartWeights used for Graebes method from the |
| 1859 | *intvec ecart and set ecartWeights |
| 1860 | */ |
| 1861 | if ((TEST_OPT_WEIGHTM)&&(F!=NULL)) |
| 1862 | { |
| 1863 | //interred machen Aenderung |
| 1864 | strat->pOrigFDeg=currRing->pFDeg; |
| 1865 | strat->pOrigLDeg=currRing->pLDeg; |
| 1866 | ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short)); |
| 1867 | /*uses automatic computation of the ecartWeights to set them*/ |
| 1868 | kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights,currRing); |
| 1869 | |
| 1870 | pSetDegProcs(currRing,totaldegreeWecart, maxdegreeWecart); |
| 1871 | if (TEST_OPT_PROT) |
| 1872 | { |
no test coverage detected