MCPcopy Create free account
hub / github.com/Singular/Singular / redLazy

Function redLazy

kernel/GBEngine/kstd2.cc:1862–2060  ·  view source on GitHub ↗

2 * reduction procedure for the inhomogeneous case * and not a degree-ordering */

Source from the content-addressed store, hash-verified

1860* and not a degree-ordering
1861*/
1862int redLazy (LObject* h,kStrategy strat)
1863{
1864 if (strat->tl<0) return 1;
1865 int at,i,ii,li;
1866 int j = 0;
1867 int pass = 0;
1868 int cnt = RED_CANONICALIZE;
1869 assume(h->pFDeg() == h->FDeg);
1870 long reddeg = h->GetpFDeg();
1871 long d;
1872 BOOLEAN test_opt_length=TEST_OPT_LENGTH;
1873
1874 h->SetShortExpVector();
1875 poly h_p = h->GetLmTailRing();
1876 h->PrepareRed(strat->use_buckets);
1877 loop
1878 {
1879 j = kFindDivisibleByInT(strat, h);
1880 if (j < 0) return 1;
1881
1882 li = strat->T[j].pLength;
1883 ii = j;
1884 /*
1885 * the polynomial to reduce with (up to the moment) is;
1886 * pi with length li
1887 */
1888
1889 i = j;
1890#if 1
1891 if (test_opt_length)
1892 {
1893 if (li<=0) li=strat->T[j].GetpLength();
1894 if(li>2)
1895 {
1896 unsigned long not_sev = ~ h->sev;
1897 loop
1898 {
1899 /*- search the shortest possible with respect to length -*/
1900 i++;
1901 if (i > strat->tl)
1902 break;
1903 if ((strat->T[i].pLength < li)
1904 &&
1905 p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i],
1906 h_p, not_sev, strat->tailRing))
1907 {
1908 /*
1909 * the polynomial to reduce with is now;
1910 */
1911 li = strat->T[i].pLength;
1912 if (li<=0) li=strat->T[i].GetpLength();
1913 ii = i;
1914 if (li<3) break;
1915 }
1916 }
1917 }
1918 }
1919#endif

Callers

nothing calls this directly

Calls 15

kFindDivisibleByInTFunction · 0.85
p_LmShortDivisibleByFunction · 0.85
PrintSFunction · 0.85
ksReducePolyFunction · 0.85
pLengthFunction · 0.85
kDeleteLcmFunction · 0.85
rIsLPRingFunction · 0.85
kFindDivisibleByInSFunction · 0.85
enterLFunction · 0.85
pFDegMethod · 0.80
GetpFDegMethod · 0.80
SetShortExpVectorMethod · 0.80

Tested by

no test coverage detected