2 *reduces h with elements from T choosing the first possible * element in t with respect to the given pDivisibleBy */
| 793 | * element in t with respect to the given pDivisibleBy |
| 794 | */ |
| 795 | int redFirst (LObject* h,kStrategy strat) |
| 796 | { |
| 797 | if (strat->tl<0) return 1; |
| 798 | if (h->IsNull()) return 0; |
| 799 | |
| 800 | int at; |
| 801 | long reddeg,d; |
| 802 | int pass = 0; |
| 803 | int cnt = RED_CANONICALIZE; |
| 804 | int j = 0; |
| 805 | |
| 806 | if (! strat->homog) |
| 807 | { |
| 808 | d = h->GetpFDeg() + h->ecart; |
| 809 | reddeg = strat->LazyDegree+d; |
| 810 | } |
| 811 | h->SetShortExpVector(); |
| 812 | loop |
| 813 | { |
| 814 | j = kFindDivisibleByInT(strat, h); |
| 815 | if (j < 0) |
| 816 | { |
| 817 | h->SetDegStuffReturnLDeg(strat->LDegLast); |
| 818 | return 1; |
| 819 | } |
| 820 | |
| 821 | if (!TEST_OPT_INTSTRATEGY) |
| 822 | strat->T[j].pNorm(); |
| 823 | #ifdef KDEBUG |
| 824 | if (TEST_OPT_DEBUG) |
| 825 | { |
| 826 | PrintS("reduce "); |
| 827 | h->wrp(); |
| 828 | PrintS(" with "); |
| 829 | strat->T[j].wrp(); |
| 830 | } |
| 831 | #endif |
| 832 | ksReducePoly(h, &(strat->T[j]), strat->kNoetherTail(), NULL, NULL, strat); |
| 833 | #ifdef KDEBUG |
| 834 | if (TEST_OPT_DEBUG) |
| 835 | { |
| 836 | PrintS(" to "); |
| 837 | wrp(h->p); |
| 838 | PrintLn(); |
| 839 | } |
| 840 | #endif |
| 841 | if (h->IsNull()) |
| 842 | { |
| 843 | assume(!rField_is_Ring(currRing)); |
| 844 | kDeleteLcm(h); |
| 845 | h->Clear(); |
| 846 | return 0; |
| 847 | } |
| 848 | if (TEST_OPT_IDLIFT) |
| 849 | { |
| 850 | if (h->p!=NULL) |
| 851 | { |
| 852 | if(p_GetComp(h->p,currRing)>strat->syzComp) |
nothing calls this directly
no test coverage detected