Changeset f34215 in git for polys/polys.h


Ignore:
Timestamp:
Nov 8, 2010, 4:57:06 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
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
Message:
moved some ring-indep. stuff to p_polys
File:
1 edited

Legend:

Unmodified
Added
Removed
  • polys/polys.h

    ra04c5e rf34215  
    1111
    1212#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 other
    18           poly routines
    19           - implemented in: pInline2.h
    20           - debugging only if PDEBUG >= 2
    21           - normally inlined, unless PDEBUG >= 2 || NO_INLINE2
    22  Level 1: operations on monomials with time proportional to length
    23           - implemented in: pInline1.h
    24           - debugging only if PDEBUG >= 1
    25           - normally inlined, unless PDEBUG >= 1 || NO_INLINE1
    26  Level 0: short operations on polynomials with time proportional to
    27           length of poly
    28           - implemented in pInline0.cc
    29           - debugging if PDEBUG
    30           - normally _not_ inlined: can be forced with
    31             #define DO_PINLINE0
    32             #include "pInline0.h"
    33  Misc   : operations on polynomials which do not fit in any of the
    34           above categories
    35           - implemented in: polys*.cc
    36           - never inlined
    37           - debugging if PDEBUG >= 0
    38 
    39  You can set PDEBUG on a per-file basis, before including "mod2.h" like
    40    #define PDEBUG 2
    41    #include "mod2.h"
    42  However, PDEBUG will only be in effect, if !NDEBUG.
    43 
    44  All p_* operations take as last argument a ring
    45  and are ring independent. Their corresponding p* operations are usually
    46  just macros to the respective p_*(..,currRing).
    47 
    48 */
    4913
    5014/***************************************************************
     
    213177 *************************************************************************/
    214178// sorts p, assumes all monomials in p are different
    215 #define pSortMerger(p)          pSort(p)
     179#define pSortMerger(p)          p_SortMerge(p, currRing)
    216180#define pSort(p)                p_SortMerge(p, currRing)
    217181
     
    256220
    257221typedef poly*   polyset;
    258 extern int      pVariables;
    259222extern int      pOrdSgn;
    260223extern BOOLEAN  pLexOrder;
     
    263226
    264227/*-------------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) */
    267232
    268233
     
    270235/*-------------ring management:----------------------*/
    271236extern void pSetGlobals(const ring r, BOOLEAN complete = TRUE);
     237
    272238// resets the pFDeg and pLDeg: if pLDeg is not given, it is
    273239// set to currRing->pLDegOrig, i.e. to the respective LDegProc which
    274240// only uses pFDeg (and not pDeg, or pTotalDegree, etc).
    275241// If you use this, make sure your procs does not make any assumptions
    276 // on oredering and/or OrdIndex -- otherwise they might return wrong results
     242// on ordering and/or OrdIndex -- otherwise they might return wrong results
    277243// on strat->tailRing
    278244extern void pSetDegProcs(pFDegProc new_FDeg, pLDegProc new_lDeg = NULL);
     
    283249#define pSetm(p)    p_Setm(p, currRing)
    284250// TODO:
    285 #define pSetmComp   pSetm
     251#define pSetmComp(p)   p_Setm(p, currRing)
    286252
    287253/***************************************************************
     
    316282
    317283
    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 
    321284/*-------------operations on polynomials:------------*/
    322285poly      pSub(poly a, poly b);
    323286poly      p_Power(poly p, int i, const ring r);
     287#define pmInit(a,b) p_mInit(a,b,currRing)
    324288
    325289// ----------------- define to enable new p_procs -----*/
Note: See TracChangeset for help on using the changeset viewer.