| 12 | ///////////////////////////////////////////////////////////////////////////// |
| 13 | |
| 14 | BOOLEAN ideal::unnecessary_S_pair(list_iterator& first_iter, |
| 15 | list_iterator& second_iter) const |
| 16 | { |
| 17 | // This function checks several criteria to discard th S-pair of the |
| 18 | // binomials referenced by the iterators. The criteria depend on the |
| 19 | // settings of the ideal´s S-pair flags. |
| 20 | |
| 21 | // The arguments are iterators instead of the referenced binomials |
| 22 | // because we have to do some equality tests. These are more efficient on |
| 23 | // iterators than on binomials. |
| 24 | |
| 25 | ///////////// criterion of relatively prime leading terms /////////////////// |
| 26 | |
| 27 | // An S-pair can discarded if the leading terms of the two binomials are |
| 28 | // relatively prime. |
| 29 | |
| 30 | if(rel_primeness) |
| 31 | if(relatively_prime(first_iter.get_element(),second_iter.get_element()) |
| 32 | ==TRUE) |
| 33 | return TRUE; |
| 34 | |
| 35 | //////////// criterion M /////////////////////////////////////////////////// |
| 36 | |
| 37 | if(M_criterion) |
| 38 | { |
| 39 | |
| 40 | list_iterator iter; |
| 41 | binomial& bin1=first_iter.get_element(); |
| 42 | binomial& bin2=second_iter.get_element(); |
| 43 | |
| 44 | // The M-criterion of Gebauer/Moeller checks binomial triples as |
| 45 | // explained in binomial.h; these are built of the elements referenced |
| 46 | // by the argument iterators and a third element appearing before the |
| 47 | // element referenced by second_iter in the generator lists. |
| 48 | |
| 49 | |
| 50 | #ifdef NO_SUPPORT_DRIVEN_METHODS_EXTENDED |
| 51 | |
| 52 | iter.set_to_list(generators); |
| 53 | |
| 54 | #endif // NO_SUPPORT_DRIVEN_METHODS_EXTENDED |
| 55 | |
| 56 | #ifdef SUPPORT_DRIVEN_METHODS_EXTENDED |
| 57 | |
| 58 | // The support of the lcm of two monomials is the union of their supports. |
| 59 | // To test criterion M, we then only have to consider lists whose support |
| 60 | // is a subset of the union of (first_iter.get_element()).head_support and |
| 61 | // (second_iter.get_element()).head_support. As only elements before |
| 62 | // second_iter.get_element() are tested, we can stop iteration as soon as |
| 63 | // we reach this element. |
| 64 | |
| 65 | int supp2=bin2.head_support%Number_of_Lists; |
| 66 | int supp_union=(bin1.head_support%Number_of_Lists)|supp2; |
| 67 | // supp_union (read as binary vector) is the union of the supports of |
| 68 | // first_iter.get_element() and second_iter.get_element() |
| 69 | // (restricted to List_Support_Variables variables). |
| 70 | |
| 71 | for(int i=0;i<S.number_of_subsets[supp_union];i++) |
nothing calls this directly
no test coverage detected