Changeset 852d4b7 in git


Ignore:
Timestamp:
Dec 2, 2010, 5:06:03 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
5698bbfd7b3c79fd778de53d05635f3bf8c2a250
Parents:
a30a39aaa446d00f01aab56db0ff2964711d5f1e
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-12-02 17:06:03+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:57:46+01:00
Message:
code cleanup: pDecrOrdTakeOutComp"
Location:
libpolys/polys/monomials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.cc

    ra30a39a r852d4b7  
    27062706}
    27072707
    2708 void p_DecrOrdTakeOutComp(poly *r_p, long comp, long order,
    2709                          poly *r_q, int *lq, const ring r)
    2710 {
    2711   spolyrec pp, qq;
    2712   poly p, q, p_prev;
    2713   int l = 0;
    2714 
    2715   pNext(&pp) = *r_p;
    2716   p = *r_p;
    2717   p_prev = &pp;
    2718   q = &qq;
    2719 
    2720 #ifdef HAVE_ASSUME
    2721   if (p != NULL)
    2722   {
    2723     while (pNext(p) != NULL)
    2724     {
    2725       assume(p_GetOrder(p,r) >= p_GetOrder(pNext(p),r));
    2726       pIter(p);
    2727     }
    2728   }
    2729   p = *r_p;
    2730 #endif
    2731 
    2732   while (p != NULL && p_GetOrder(p,r) > order) pIter(p);
    2733 
    2734   while(p != NULL && p_GetOrder(p,r) == order)
    2735   {
    2736     while (p_GetComp(p,r) == comp)
    2737     {
    2738       pNext(q) = p;
    2739       pIter(q);
    2740       pIter(p);
    2741       p_SetComp(p, 0,r);
    2742       p_SetmComp(p,r);
    2743       l++;
    2744       if (p == NULL || p_GetOrder(p,r) != order)
    2745       {
    2746         pNext(p_prev) = p;
    2747         goto Finish;
    2748       }
    2749     }
    2750     pNext(p_prev) = p;
    2751     p_prev = p;
    2752     pIter(p);
    2753   }
    2754 
    2755   Finish:
    2756   pNext(q) = NULL;
    2757   *r_p = pNext(&pp);
    2758   *r_q = pNext(&qq);
    2759   *lq = l;
    2760 }
    2761 
    27622708void p_DeleteComp(poly * p,int k, const ring r)
    27632709{
  • libpolys/polys/monomials/p_polys.h

    ra30a39a r852d4b7  
    17881788void p_TakeOutComp(poly *p, long comp, poly *q, int *lq, const ring r);
    17891789
    1790 // Similar to pTakeOutComp, except that only those components are
    1791 // taken out whose Order == order
    1792 // ASSUME: monomial ordering is Order compatible, i.e., if m1, m2 Monoms then
    1793 //         m1 >= m2 ==> pGetOrder(m1) >= pGetOrder(m2)
    1794 void p_DecrOrdTakeOutComp(poly *r_p, long comp, long order,
    1795                          poly *r_q, int *lq, const ring r)
    1796 
    17971790// This is something weird -- Don't use it, unless you know what you are doing
    17981791poly      p_TakeOutComp(poly * p, int k);
Note: See TracChangeset for help on using the changeset viewer.