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

Function M

IntegerProgramming/binomial.cc:1138–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136
1137
1138BOOLEAN M(const binomial& a, const binomial& b, const binomial& c)
1139// Returns TRUE iff lcm(head(a),head(c)) divides properly lcm(head(b),head(c)).
1140// This is checked by comparing the positive components of the exponent
1141// vectors.
1142{
1143
1144
1145#ifdef SUPPORT_DRIVEN_METHODS
1146
1147 long b_or_c=b.head_support|c.head_support;
1148
1149 if((a.head_support|b_or_c) != b_or_c)
1150 return FALSE;
1151 // The support of lcm(head(a),head(c)) equals the union of the head supports
1152 // of a and c. The above condition verifies if the support of
1153 // lcm(head(a),head(c)) is contained in the support of lcm(head(b),head(c))
1154 // by checking if head a involves a variable that is not involved in
1155 // head(b) or head(c).
1156
1157#endif // SUPPORT_DRIVEN_METHODS
1158
1159
1160 BOOLEAN properly=FALSE;
1161
1162 for(short i=0;i<a._number_of_variables;i++)
1163 {
1164 Integer a_exponent=a.exponent_vector[i];
1165 Integer b_exponent=b.exponent_vector[i];
1166 Integer c_exponent=c.exponent_vector[i];
1167 Integer m1=MAXIMUM(a_exponent,c_exponent);
1168 Integer m2=MAXIMUM(b_exponent,c_exponent);
1169
1170 if(m1>0)
1171 {
1172 if(m1>m2)
1173 return FALSE;
1174 if(m1<m2)
1175 properly=TRUE;
1176 }
1177 }
1178
1179 return properly;
1180}
1181
1182
1183

Callers 15

getBiTerms_helperFunction · 0.85
modGCDFqFunction · 0.85
modGCDGFFunction · 0.85
modGCDFpFunction · 0.85
readOffSolutionFunction · 0.85
gaussianElimFpFunction · 0.85
gaussianElimFqFunction · 0.85
solveSystemFpFunction · 0.85
solveSystemFqFunction · 0.85
monicSparseInterpolFunction · 0.85
nonMonicSparseInterpolFunction · 0.85
sparseGCDFqFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected