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

Function F

IntegerProgramming/binomial.cc:1185–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183
1184
1185BOOLEAN F(const binomial& a, const binomial& b, const binomial& c)
1186// verifies if lcm(head(a),head(c))=lcm(head(b),head(c))
1187{
1188
1189#ifdef SUPPORT_DRIVEN_METHODS
1190
1191 if((a.head_support|c.head_support)!=(b.head_support|c.head_support))
1192 return FALSE;
1193 // The above condition verifies if the support of lcm(head(a),head(c))
1194 // equals the support of lcm(head(b),head(c)).
1195
1196#endif // SUPPORT_DRIVEN_METHODS
1197
1198 for(short i=0;i<a._number_of_variables;i++)
1199 {
1200 Integer a_exponent=a.exponent_vector[i];
1201 Integer b_exponent=b.exponent_vector[i];
1202 Integer c_exponent=c.exponent_vector[i];
1203 Integer m1=MAXIMUM(a_exponent,c_exponent);
1204 Integer m2=MAXIMUM(b_exponent,c_exponent);
1205
1206 if((m1!=m2) && (m1>0 || m2>0))
1207 return FALSE;
1208 }
1209
1210 return TRUE;
1211}
1212
1213
1214

Callers 1

unnecessary_S_pairMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected