| 1530 | |
| 1531 | |
| 1532 | int binomial::adapt_to_term_ordering(const term_ordering& w) |
| 1533 | { |
| 1534 | |
| 1535 | if(w.compare_to_zero(exponent_vector)<0) |
| 1536 | { |
| 1537 | // then exchange head and tail |
| 1538 | for(short i=0;i<_number_of_variables;i++) |
| 1539 | exponent_vector[i]*=(-1); |
| 1540 | |
| 1541 | |
| 1542 | #ifdef SUPPORT_DRIVEN_METHODS |
| 1543 | |
| 1544 | unsigned long swap=head_support; |
| 1545 | head_support=tail_support; |
| 1546 | tail_support=swap; |
| 1547 | |
| 1548 | #endif |
| 1549 | |
| 1550 | |
| 1551 | return -1; |
| 1552 | // binomial changed |
| 1553 | } |
| 1554 | |
| 1555 | else |
| 1556 | return 1; |
| 1557 | // binomial unchanged |
| 1558 | } |
| 1559 | |
| 1560 | |
| 1561 |
no test coverage detected