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

Function hFirstSeries

kernel/combinatorics/hilb.cc:2167–2245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2165}
2166
2167intvec* hFirstSeries(ideal A,intvec *module_w,ideal Q, intvec *wdegree)
2168{
2169 intvec* res;
2170 #if 0
2171 // find degree bound
2172 int a,b,prod;
2173 a=rVar(currRing);
2174 b=1;
2175 prod=a;
2176 while(prod<(1<<15) && (a>1))
2177 {
2178 a--;b++;
2179 prod*=a;
2180 prod/=b;
2181 }
2182 if (a==1) b=(1<<15);
2183 // check degree bound
2184 BOOLEAN large_deg=FALSE;
2185 int max=0;
2186 for(int i=IDELEMS(A)-1;i>=0;i--)
2187 {
2188 if (A->m[i]!=NULL)
2189 {
2190 int mm=p_Totaldegree(A->m[i],currRing);
2191 if (mm>max)
2192 {
2193 max=mm;
2194 if (max>=b)
2195 {
2196 large_deg=TRUE;
2197 break;
2198 }
2199 }
2200 }
2201 }
2202 if (!large_deg)
2203 {
2204 void (*WerrorS_save)(const char *s) = WerrorS_callback;
2205 WerrorS_callback=WerrorS_dummy;
2206 res=hFirstSeries1(A,module_w,Q,wdegree);
2207 WerrorS_callback=WerrorS_save;
2208 if (errorreported==0)
2209 {
2210 return res;
2211 }
2212 else errorreported=0;// retry with other alg.:
2213 }
2214 #endif
2215
2216 if (hilb_Qt==NULL) hilb_Qt=makeQt();
2217 if (!isModule(A,currRing))
2218 return hFirstSeries0(A,Q,wdegree,currRing,hilb_Qt);
2219 res=NULL;
2220 int w_max=0,w_min=0;
2221 if (module_w!=NULL)
2222 {
2223 w_max=module_w->max_in();
2224 w_min=module_w->min_in();

Callers 15

jjHILBERT2Function · 0.85
LastGBFunction · 0.85
Rec_LastGBFunction · 0.85
REC_GB_MwalkFunction · 0.85
MwalkAltFunction · 0.85
MwalkFunction · 0.85
MrwalkFunction · 0.85
MpwalkFunction · 0.85
MprwalkFunction · 0.85
rec_fractal_callFunction · 0.85
rec_r_fractal_callFunction · 0.85
TranMImprovwalkFunction · 0.85

Calls 11

rVarFunction · 0.85
p_TotaldegreeFunction · 0.85
hFirstSeries1Function · 0.85
makeQtFunction · 0.85
isModuleFunction · 0.85
hFirstSeries0Function · 0.85
getModuleCompFunction · 0.85
id_DeleteFunction · 0.85
ivAddFunction · 0.85
ivAddShiftFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected