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

Function id_RankFreeModule

libpolys/polys/simpleideals.cc:974–991  ·  view source on GitHub ↗

return the maximal component number found in any polynomial in s

Source from the content-addressed store, hash-verified

972
973/// return the maximal component number found in any polynomial in s
974long id_RankFreeModule (ideal s, ring lmRing, ring tailRing)
975{
976 long j = 0;
977
978 if (rRing_has_Comp(tailRing) && rRing_has_Comp(lmRing))
979 {
980 poly *p=s->m;
981 for (unsigned int l=IDELEMS(s); l > 0; --l, ++p)
982 if (*p != NULL)
983 {
984 pp_Test(*p, lmRing, tailRing);
985 const long k = p_MaxComp(*p, lmRing, tailRing);
986 if (k>j) j = k;
987 }
988 }
989
990 return j; // return -1;
991}
992
993/*2
994*returns true if id is homogenous with respect to the aktual weights

Callers 2

idShowFunction · 0.70
id_Module2formatedMatrixFunction · 0.70

Calls 1

p_MaxCompFunction · 0.85

Tested by

no test coverage detected