Changeset f34215 in git for polys/polys.h
- Timestamp:
- Nov 8, 2010, 4:57:06 PM (13 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- fb4075bf0613cccede0552d05c1b4ee37a7f6530
- Parents:
- a04c5ec2b888d58e53a0701c12400ddca144d53e
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-11-08 16:57:06+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:35+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
polys/polys.h
ra04c5e rf34215 11 11 12 12 #include <kernel/p_polys.h> 13 /*14 Some general remarks:15 We divide poly operations into roughly 4 categories:16 Level 2: operations on monomials/polynomials with constant time,17 or operations which are just dispatchers to other18 poly routines19 - implemented in: pInline2.h20 - debugging only if PDEBUG >= 221 - normally inlined, unless PDEBUG >= 2 || NO_INLINE222 Level 1: operations on monomials with time proportional to length23 - implemented in: pInline1.h24 - debugging only if PDEBUG >= 125 - normally inlined, unless PDEBUG >= 1 || NO_INLINE126 Level 0: short operations on polynomials with time proportional to27 length of poly28 - implemented in pInline0.cc29 - debugging if PDEBUG30 - normally _not_ inlined: can be forced with31 #define DO_PINLINE032 #include "pInline0.h"33 Misc : operations on polynomials which do not fit in any of the34 above categories35 - implemented in: polys*.cc36 - never inlined37 - debugging if PDEBUG >= 038 39 You can set PDEBUG on a per-file basis, before including "mod2.h" like40 #define PDEBUG 241 #include "mod2.h"42 However, PDEBUG will only be in effect, if !NDEBUG.43 44 All p_* operations take as last argument a ring45 and are ring independent. Their corresponding p* operations are usually46 just macros to the respective p_*(..,currRing).47 48 */49 13 50 14 /*************************************************************** … … 213 177 *************************************************************************/ 214 178 // sorts p, assumes all monomials in p are different 215 #define pSortMerger(p) p Sort(p)179 #define pSortMerger(p) p_SortMerge(p, currRing) 216 180 #define pSort(p) p_SortMerge(p, currRing) 217 181 … … 256 220 257 221 typedef poly* polyset; 258 extern int pVariables;259 222 extern int pOrdSgn; 260 223 extern BOOLEAN pLexOrder; … … 263 226 264 227 /*-------------predicate on polys ----------------------*/ 265 BOOLEAN pHasNotCF(poly p1, poly p2); /*has no common factor ?*/ 266 void pSplit(poly p, poly * r); /*p => IN(p), r => REST(p) */ 228 #define pHasNotCF(p1,p2) p_HasNotCF(p1,p2,currRing) 229 /*has no common factor ?*/ 230 #define pSplit(p,r) p_Split(p,r) 231 /*p => IN(p), r => REST(p) */ 267 232 268 233 … … 270 235 /*-------------ring management:----------------------*/ 271 236 extern void pSetGlobals(const ring r, BOOLEAN complete = TRUE); 237 272 238 // resets the pFDeg and pLDeg: if pLDeg is not given, it is 273 239 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which 274 240 // only uses pFDeg (and not pDeg, or pTotalDegree, etc). 275 241 // If you use this, make sure your procs does not make any assumptions 276 // on or edering and/or OrdIndex -- otherwise they might return wrong results242 // on ordering and/or OrdIndex -- otherwise they might return wrong results 277 243 // on strat->tailRing 278 244 extern void pSetDegProcs(pFDegProc new_FDeg, pLDegProc new_lDeg = NULL); … … 283 249 #define pSetm(p) p_Setm(p, currRing) 284 250 // TODO: 285 #define pSetmComp pSetm251 #define pSetmComp(p) p_Setm(p, currRing) 286 252 287 253 /*************************************************************** … … 316 282 317 283 318 poly pmInit(const char *s, BOOLEAN &ok); /* monom s -> poly, interpreter */319 const char * p_Read(const char *s, poly &p,const ring r); /* monom -> poly */320 321 284 /*-------------operations on polynomials:------------*/ 322 285 poly pSub(poly a, poly b); 323 286 poly p_Power(poly p, int i, const ring r); 287 #define pmInit(a,b) p_mInit(a,b,currRing) 324 288 325 289 // ----------------- define to enable new p_procs -----*/
Note: See TracChangeset
for help on using the changeset viewer.