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

Function getMonoms

factory/cfModGcd.cc:1964–1996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1962#endif
1963
1964CFArray
1965getMonoms (const CanonicalForm& F)
1966{
1967 if (F.inCoeffDomain())
1968 {
1969 CFArray result= CFArray (1);
1970 result [0]= 1;
1971 return result;
1972 }
1973 if (F.isUnivariate())
1974 {
1975 CFArray result= CFArray (size(F));
1976 int j= 0;
1977 for (CFIterator i= F; i.hasTerms(); i++, j++)
1978 result[j]= power (F.mvar(), i.exp());
1979 return result;
1980 }
1981 int numMon= size (F);
1982 CFArray result= CFArray (numMon);
1983 int j= 0;
1984 CFArray recResult;
1985 Variable x= F.mvar();
1986 CanonicalForm powX;
1987 for (CFIterator i= F; i.hasTerms(); i++)
1988 {
1989 powX= power (x, i.exp());
1990 recResult= getMonoms (i.coeff());
1991 for (int k= 0; k < recResult.size(); k++)
1992 result[j+k]= powX*recResult[k];
1993 j += recResult.size();
1994 }
1995 return result;
1996}
1997
1998#if defined(HAVE_NTL) || defined(HAVE_FLINT)
1999CFArray

Callers 3

monicSparseInterpolFunction · 0.85
nonMonicSparseInterpolFunction · 0.85
LucksWangSparseHeuristicFunction · 0.85

Calls 9

sizeFunction · 0.85
powerFunction · 0.85
hasTermsMethod · 0.80
mvarMethod · 0.80
inCoeffDomainMethod · 0.45
isUnivariateMethod · 0.45
expMethod · 0.45
coeffMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected