Changeset 722db6 in git for kernel/polys.cc


Ignore:
Timestamp:
Dec 2, 2010, 5:07:36 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ffe4fd8760d02e6be0620d213646ceeb9a2c4e18
Parents:
66bff8383ec423ff4d78015828b80285a4d2888a
Message:
code cleanup: kBucketTakeOutComp, pDecrOrdTakeOutComp

git-svn-id: file:///usr/local/Singular/svn/trunk@13702 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/polys.cc

    r66bff8 r722db6  
    465465  pTest(*r_p);
    466466  pTest(*r_q);
    467 }
    468 
    469 void pDecrOrdTakeOutComp(poly *r_p, long comp, long order,
    470                          poly *r_q, int *lq)
    471 {
    472   spolyrec pp, qq;
    473   poly p, q, p_prev;
    474   int l = 0;
    475 
    476   pNext(&pp) = *r_p;
    477   p = *r_p;
    478   p_prev = &pp;
    479   q = &qq;
    480 
    481 #ifdef HAVE_ASSUME
    482   if (p != NULL)
    483   {
    484     while (pNext(p) != NULL)
    485     {
    486       assume(pGetOrder(p) >= pGetOrder(pNext(p)));
    487       pIter(p);
    488     }
    489   }
    490   p = *r_p;
    491 #endif
    492 
    493   while (p != NULL && pGetOrder(p) > order) pIter(p);
    494 
    495   while(p != NULL && pGetOrder(p) == order)
    496   {
    497     while (pGetComp(p) == comp)
    498     {
    499       pNext(q) = p;
    500       pIter(q);
    501       pIter(p);
    502       pSetComp(p, 0);
    503       pSetmComp(p);
    504       l++;
    505       if (p == NULL || pGetOrder(p) != order)
    506       {
    507         pNext(p_prev) = p;
    508         goto Finish;
    509       }
    510     }
    511     pNext(p_prev) = p;
    512     p_prev = p;
    513     pIter(p);
    514   }
    515 
    516   Finish:
    517   pNext(q) = NULL;
    518   *r_p = pNext(&pp);
    519   *r_q = pNext(&qq);
    520   *lq = l;
    521467}
    522468
Note: See TracChangeset for help on using the changeset viewer.