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

Function init4ext

factory/facFqBivar.cc:7659–7710  ·  view source on GitHub ↗

findMinPoly

Source from the content-addressed store, hash-verified

7657
7658#ifdef HAVE_NTL // findMinPoly
7659ExtensionInfo
7660init4ext (const ExtensionInfo& info, const CanonicalForm& evaluation,
7661 int& degMipo
7662 )
7663{
7664 bool GF= (CFFactory::gettype() == GaloisFieldDomain);
7665 Variable alpha= info.getAlpha();
7666 if (GF)
7667 {
7668 degMipo= getGFDegree();
7669 CanonicalForm GFMipo= gf_mipo;
7670 setCharacteristic (getCharacteristic());
7671 GFMipo.mapinto();
7672 alpha= rootOf (GFMipo);
7673 setCharacteristic (getCharacteristic(), degMipo, info.getGFName());
7674 }
7675 else
7676 {
7677 alpha= info.getAlpha();
7678 degMipo= degree (getMipo (alpha));
7679 }
7680
7681 Variable gamma;
7682 CanonicalForm primElemAlpha, imPrimElemAlpha;
7683 if ((!GF && evaluation != alpha) || (GF && evaluation != getGFGenerator()))
7684 {
7685 CanonicalForm bufEvaluation;
7686 if (GF)
7687 {
7688 setCharacteristic (getCharacteristic());
7689 bufEvaluation= GF2FalphaRep (evaluation, alpha);
7690 }
7691 else
7692 bufEvaluation= evaluation;
7693 CanonicalForm mipo= findMinPoly (bufEvaluation, alpha);
7694 gamma= rootOf (mipo);
7695 Variable V_buf;
7696 bool fail= false;
7697 primElemAlpha= primitiveElement (alpha, V_buf, fail);
7698 imPrimElemAlpha= map (primElemAlpha, alpha, bufEvaluation, gamma);
7699
7700 if (GF)
7701 setCharacteristic (getCharacteristic(), degMipo, info.getGFName());
7702 }
7703 else
7704 gamma= alpha;
7705 ExtensionInfo info2= ExtensionInfo (alpha, gamma, primElemAlpha,
7706 imPrimElemAlpha, 1, info.getGFName(), true
7707 );
7708
7709 return info2;
7710}
7711#endif
7712
7713#ifdef HAVE_NTL // extSieveSmallFactors,...

Callers 2

facFqBivar.ccFile · 0.85
biFactorizeFunction · 0.85

Calls 15

getGFDegreeFunction · 0.85
setCharacteristicFunction · 0.85
getCharacteristicFunction · 0.85
rootOfFunction · 0.85
degreeFunction · 0.85
getMipoFunction · 0.85
getGFGeneratorFunction · 0.85
GF2FalphaRepFunction · 0.85
findMinPolyFunction · 0.85
primitiveElementFunction · 0.85
mapFunction · 0.85
ExtensionInfoClass · 0.85

Tested by

no test coverage detected