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

Function absFactorize

factory/facAbsFact.cc:262–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262CFAFList absFactorize (const CanonicalForm& G
263 )
264{
265 //TODO handle homogeneous input, is already done in LIB interface but still...
266 ASSERT (getCharacteristic() == 0, "expected poly over Q");
267
268 CanonicalForm F= G;
269
270 CanonicalForm LcF= Lc (F);
271 bool isRat= isOn (SW_RATIONAL);
272 if (isRat)
273 F *= bCommonDen (F);
274
275 Off (SW_RATIONAL);
276 F /= icontent (F);
277 if (isRat)
278 On (SW_RATIONAL);
279
280 CFFList rationalFactors= factorize (F);
281
282 CFAFList result, resultBuf;
283
284 CFAFListIterator iter;
285 CFFListIterator i= rationalFactors;
286 i++;
287 for (; i.hasItem(); i++)
288 {
289 resultBuf= absFactorizeMain (i.getItem().factor());
290 for (iter= resultBuf; iter.hasItem(); iter++)
291 iter.getItem()= CFAFactor (iter.getItem().factor(),
292 iter.getItem().minpoly(), i.getItem().exp());
293 result= Union (result, resultBuf);
294 }
295
296 if (isRat)
297 normalize (result);
298 result.insert (CFAFactor (LcF, 1, 1));
299
300 return result;
301}
302
303CFAFList absFactorizeMain (const CanonicalForm& G)
304{

Callers 1

singclap_absFactorizeFunction · 0.85

Calls 15

getCharacteristicFunction · 0.85
LcFunction · 0.85
isOnFunction · 0.85
bCommonDenFunction · 0.85
OffFunction · 0.85
icontentFunction · 0.85
OnFunction · 0.85
factorizeFunction · 0.85
absFactorizeMainFunction · 0.85
UnionFunction · 0.85
hasItemMethod · 0.80
minpolyMethod · 0.80

Tested by

no test coverage detected