Changeset 5bc2461 in git for polys/polys1.cc


Ignore:
Timestamp:
Nov 22, 2010, 4:49:34 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a6633e9e6157506ee434baf1e2be9bb27e111c71
Parents:
949e57ce98be32aa204cfe96c543f2bde13278a6
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-11-22 16:49:34+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:41+01:00
Message:
p_SetModDeg, pModDeg
File:
1 edited

Legend:

Unmodified
Added
Removed
  • polys/polys1.cc

    r949e57 r5bc2461  
    3232#include <kernel/ratgring.h>
    3333#endif
    34 
    35 /*-------- several access procedures to monomials -------------------- */
    36 /*
    37 * the module weights for std
    38 */
    39 static pFDegProc pOldFDeg;
    40 static pLDegProc pOldLDeg;
    41 static intvec * pModW;
    42 static BOOLEAN pOldLexOrder;
    43 
    44 static long pModDeg(poly p, ring r = currRing)
    45 {
    46   long d=pOldFDeg(p, r);
    47   int c=p_GetComp(p, r);
    48   if ((c>0) && (pModW->range(c-1))) d+= (*pModW)[c-1];
    49   return d;
    50   //return pOldFDeg(p, r)+(*pModW)[p_GetComp(p, r)-1];
    51 }
    52 
    53 void pSetModDeg(intvec *w)
    54 {
    55   if (w!=NULL)
    56   {
    57     pModW = w;
    58     pOldFDeg = pFDeg;
    59     pOldLDeg = pLDeg;
    60     pOldLexOrder = pLexOrder;
    61     pSetDegProcs(pModDeg);
    62     pLexOrder = TRUE;
    63   }
    64   else
    65   {
    66     pModW = NULL;
    67     pRestoreDegProcs(pOldFDeg, pOldLDeg);
    68     pLexOrder = pOldLexOrder;
    69   }
    70 }
    7134
    7235
Note: See TracChangeset for help on using the changeset viewer.