Changeset 949e57 in git
- Timestamp:
- Nov 22, 2010, 4:41:43 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 5bc2461738edac589c7bb7fe19322b1ed8897029
- Parents:
- 5c39a93f6a52a5a83fcc9028a16d640959005ca5
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-11-22 16:41:43+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:41+01:00
- Location:
- polys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
polys/monomials/p_polys.cc
r5c39a9 r949e57 2914 2914 } 2915 2915 } 2916 // 2917 // resets the pFDeg and pLDeg: if pLDeg is not given, it is 2918 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which 2919 // only uses pFDeg (and not pDeg, or pTotalDegree, etc) 2920 void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg) 2921 { 2922 assume(new_FDeg != NULL); 2923 r->pFDeg = new_FDeg; 2924 2925 if (new_lDeg == NULL) 2926 new_lDeg = r->pLDegOrig; 2927 2928 r->pLDeg = new_lDeg; 2929 } 2930 2931 // restores pFDeg and pLDeg: 2932 void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg) 2933 { 2934 assume(old_FDeg != NULL && old_lDeg != NULL); 2935 r->pFDeg = old_FDeg; 2936 r->pLDeg = old_lDeg; 2937 } 2938 2916 2939 2917 2940 /*************************************************************** -
polys/monomials/p_polys.h
r5c39a9 r949e57 1805 1805 void p_SetGlobals(const ring r, BOOLEAN complete = TRUE); 1806 1806 1807 // resets the pFDeg and pLDeg: if pLDeg is not given, it is 1808 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which 1809 // only uses pFDeg (and not pDeg, or pTotalDegree, etc). 1810 // If you use this, make sure your procs does not make any assumptions 1811 // on ordering and/or OrdIndex -- otherwise they might return wrong results 1812 // on strat->tailRing 1813 void pSetDegProcs(ring r. pFDegProc new_FDeg, pLDegProc new_lDeg = NULL); 1814 // restores pFDeg and pLDeg: 1815 void pRestoreDegProcs(ring r. pFDegProc old_FDeg, pLDegProc old_lDeg); 1816 1817 1807 1818 #endif // P_POLYS_H 1808 1819 -
polys/polys.cc
r5c39a9 r949e57 25 25 #endif 26 26 27 /* ----------- global variables, set by pSetGlobals --------------------- */28 /* computes length and maximal degree of a POLYnomial */29 pLDegProc pLDeg;30 /* computes the degree of the initial term, used for std */31 pFDegProc pFDeg;32 /* the monomial ordering of the head monomials a and b */33 /* returns -1 if a comes before b, 0 if a=b, 1 otherwise */34 35 27 /* 1 for polynomial ring, -1 otherwise */ 36 28 int pOrdSgn; … … 42 34 /* the highest monomial below pHEdge */ 43 35 poly ppNoether = NULL; 44 45 // resets the pFDeg and pLDeg: if pLDeg is not given, it is46 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which47 // only uses pFDeg (and not pDeg, or pTotalDegree, etc)48 void pSetDegProcs(pFDegProc new_FDeg, pLDegProc new_lDeg)49 {50 assume(new_FDeg != NULL);51 pFDeg = new_FDeg;52 currRing->pFDeg = new_FDeg;53 54 if (new_lDeg == NULL)55 new_lDeg = currRing->pLDegOrig;56 57 pLDeg = new_lDeg;58 currRing->pLDeg = new_lDeg;59 }60 61 62 // restores pFDeg and pLDeg:63 extern void pRestoreDegProcs(pFDegProc old_FDeg, pLDegProc old_lDeg)64 {65 assume(old_FDeg != NULL && old_lDeg != NULL);66 pFDeg = old_FDeg;67 currRing->pFDeg = old_FDeg;68 pLDeg = old_lDeg;69 currRing->pLDeg = old_lDeg;70 }71 36 72 37 #ifdef HAVE_RINGS //TODO Oliver -
polys/polys.h
r5c39a9 r949e57 230 230 231 231 232 /*-------------ring management:----------------------*/233 234 // resets the pFDeg and pLDeg: if pLDeg is not given, it is235 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which236 // only uses pFDeg (and not pDeg, or pTotalDegree, etc).237 // If you use this, make sure your procs does not make any assumptions238 // on ordering and/or OrdIndex -- otherwise they might return wrong results239 // on strat->tailRing240 extern void pSetDegProcs(pFDegProc new_FDeg, pLDegProc new_lDeg = NULL);241 // restores pFDeg and pLDeg:242 extern void pRestoreDegProcs(pFDegProc old_FDeg, pLDegProc old_lDeg);243 244 232 /*-----------the ordering of monomials:-------------*/ 245 233 #define pSetm(p) p_Setm(p, currRing) … … 252 240 * 253 241 ***************************************************************/ 254 extern pLDegProc pLDeg; 255 extern pFDegProc pFDeg; 242 static inline long pFDeg(const poly p, const ring r) { return r->pFDeg(p,r); } 243 static inline long pLDeg(const poly p, int *l, const ring r) { return r->pLDeg(p,l,r); } 256 244 #define pWeight(c) p_Weight(c,currRing) 257 245 #define pDeg(p) p_Deg(p,currRing)
Note: See TracChangeset
for help on using the changeset viewer.