Changeset 91a305 in git


Ignore:
Timestamp:
Jun 9, 2010, 1:13:09 PM (14 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '45e267b9942dec9429fe249ce3e5e44ab80a6a3a')
Children:
9353457495bb95a039dc0e356e79a69591dc779e
Parents:
c08834bf50b47d2b3cb0fead54ea4d7bdd59b433
git-author:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2010-06-09 13:13:09+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:06+01:00
Message:
moved macros to the top of coeffs.h (for a better readability)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • coeffs/coeffs.h

    rc08834 r91a305  
    2929};
    3030
     31struct snumber;
     32typedef struct snumber *   number;
     33
     34//
     35// the access macros:
     36
     37#define n_Copy(n, r)          (r)->cfCopy(n,r)
     38#define n_Delete(n, r)        (r)->cfDelete(n,r)
     39#define n_Mult(n1, n2, r)     (r)->cfMult(n1, n2,r)
     40#define n_Add(n1, n2, r)      (r)->cfAdd(n1, n2,r)
     41#define n_IsZero(n, r)        (r)->cfIsZero(n,r)
     42#define n_Equal(n1, n2, r)    (r)->cfEqual(n1, n2,r)
     43#define n_Neg(n, r)           (r)->cfNeg(n,r)
     44#define n_Sub(n1, n2, r)      (r)->cfSub(n1, n2,r)
     45#define n_GetChar(r)          nInternalChar(r)
     46#define n_Init(i, r)          (r)->cfInit(i,r)
     47#define n_IsOne(n, r)         (r)->cfIsOne(n,r)
     48#define n_IsMOne(n, r)        (r)->cfIsMOne(n,r)
     49#define n_GreaterZero(n, r)   (r)->cfGreaterZero(n,r)
     50#define n_Write(n, r)         (r)->cfWrite(n,r)
     51#define n_Normalize(n, r)     (r)->cfNormalize(n,r)
     52#define n_Gcd(a, b, r)        (r)->cfGcd(a,b,r)
     53#define n_IntDiv(a, b, r)     (r)->cfIntDiv(a,b,r)
     54#define n_Div(a, b, r)        (r)->cfDiv(a,b,r)
     55#define n_Invers(a, r)        (r)->cfInvers(a,r)
     56#define n_ExactDiv(a, b, r)   (r)->cfExactDiv(a,b,r)
     57#define n_Test(a,r)           (r)->cfDBTest(a,r,__FILE__,__LINE__)
     58
     59#define n_InpMult(a, b, r)    (r)->cfInpMult(a,b,r)
     60#define n_Power(a, b, res, r) (r)->cfPower(a,b,res,r)
     61#define n_Size(n,r)           (r)->cfSize(n,r)
     62#define n_GetDenom(N,r)       (r)->cfGetDenom((N),r)
     63#define n_GetNumerator(N,r)   (r)->cfGetNumerator((N),r)
     64
     65// and the routines w.r.t. currRing:
     66// (should only be used in the context of currRing, i.e. in the interpreter)
     67#define nCopy(n)          n_Copy(n, currRing->cf)
     68#define nDelete(n)        n_Delete(n, currRing->cf)
     69#define nMult(n1, n2)     n_Mult(n1, n2, currRing->cf)
     70#define nAdd(n1, n2)      n_Add(n1, n2, currRing->cf)
     71#define nIsZero(n)        n_IsZero(m, currRing->cf)
     72#define nEqual(n1, n2)    n_Equal(n1, n2, currRing->cf)
     73#define nNeg(n)           n_Neg(n, currRing->cf)
     74#define nSub(n1, n2)      n_Sub(n1, n2, currRing->cf)
     75#define nGetChar()        nInternalChar(currRing->cf)
     76#define nInit(i)          n_Init(i, currRing->cf)
     77#define nIsOne(n)         n_IsOne(n, currRing->cf)
     78#define nIsMOne(n)        n_IsMOne(n, currRing->cf)
     79#define nGreaterZero(n)   n_GreaterZero(n, currRing->cf)
     80#define nWrite(n)         n_Write(n,currRing->cf)
     81#define nNormalize(n)     n_Normalize(n,currRing->cf)
     82#define nGcd(a, b)        n_Gcd(a,b,currRing->cf)
     83#define nIntDiv(a, b)     n_IntDiv(a,b,currRing->cf)
     84#define nDiv(a, b)        n_Div(a,b,currRing->cf)
     85#define nInvers(a)        n_Invers(a,currRing->cf)
     86#define nExactDiv(a, b)   n_ExactDiv(a,b,currRing->cf)
     87#define nTest(a)          n_Test(a,currRing->cf)
     88
     89#define nInpMult(a, b)    n_InpMult(a,b,currRing->cf)
     90#define nPower(a, b, res) n_Power(a,b,res,currRing->cf)
     91#define nSize(n)          n_Size(n,currRing->cf)
     92#define nGetDenom(N)      n_GetDenom((N),currRing->cf)
     93#define nGetNumerator(N)  n_GetNumerator((N),currRing->cf)
     94
     95#define nSetMap(R)        n_SetMap(R,currRing->cf)
     96
    3197struct n_Procs_s;
    3298typedef struct  n_Procs_s  n_Procs_s;
    3399typedef struct  n_Procs_s  *coeffs;
    34100
    35 
    36 
    37 struct snumber;
    38 typedef struct snumber *   number;
    39101typedef number (*numberfunc)(number a, number b, const coeffs r);
    40102
     
    180242}
    181243
    182 //
    183 // the access macros:
    184 
    185 #define n_Copy(n, r)          (r)->cfCopy(n,r)
    186 #define n_Delete(n, r)        (r)->cfDelete(n,r)
    187 #define n_Mult(n1, n2, r)     (r)->cfMult(n1, n2,r)
    188 #define n_Add(n1, n2, r)      (r)->cfAdd(n1, n2,r)
    189 #define n_IsZero(n, r)        (r)->cfIsZero(n,r)
    190 #define n_Equal(n1, n2, r)    (r)->cfEqual(n1, n2,r)
    191 #define n_Neg(n, r)           (r)->cfNeg(n,r)
    192 #define n_Sub(n1, n2, r)      (r)->cfSub(n1, n2,r)
    193 #define n_GetChar(r)          nInternalChar(r)
    194 #define n_Init(i, r)          (r)->cfInit(i,r)
    195 #define n_IsOne(n, r)         (r)->cfIsOne(n,r)
    196 #define n_IsMOne(n, r)        (r)->cfIsMOne(n,r)
    197 #define n_GreaterZero(n, r)   (r)->cfGreaterZero(n,r)
    198 #define n_Write(n, r)         (r)->cfWrite(n,r)
    199 #define n_Normalize(n, r)     (r)->cfNormalize(n,r)
    200 #define n_Gcd(a, b, r)        (r)->cfGcd(a,b,r)
    201 #define n_IntDiv(a, b, r)     (r)->cfIntDiv(a,b,r)
    202 #define n_Div(a, b, r)        (r)->cfDiv(a,b,r)
    203 #define n_Invers(a, r)        (r)->cfInvers(a,r)
    204 #define n_ExactDiv(a, b, r)   (r)->cfExactDiv(a,b,r)
    205 #define n_Test(a,r)           (r)->cfDBTest(a,r,__FILE__,__LINE__)
    206 
    207 #define n_InpMult(a, b, r)    (r)->cfInpMult(a,b,r)
    208 #define n_Power(a, b, res, r) (r)->cfPower(a,b,res,r)
    209 #define n_Size(n,r)           (r)->cfSize(n,r)
    210 #define n_GetDenom(N,r)       (r)->cfGetDenom((N),r)
    211 #define n_GetNumerator(N,r)   (r)->cfGetNumerator((N),r)
    212 
     244// nach einer heissen Diskussion
     245void           nNew(number * a);
    213246#define n_New(n, r)           nNew(n)
    214247
    215 
    216 // and the routines w.r.t. currRing:
    217 // (should only be used in the context of currRing, i.e. in the interpreter)
    218 void           nNew(number * a);
    219 #define nCopy(n)          n_Copy(n, currRing->cf)
    220 #define nDelete(n)        n_Delete(n, currRing->cf)
    221 #define nMult(n1, n2)     n_Mult(n1, n2, currRing->cf)
    222 #define nAdd(n1, n2)      n_Add(n1, n2, currRing->cf)
    223 #define nIsZero(n)        n_IsZero(m, currRing->cf)
    224 #define nEqual(n1, n2)    n_Equal(n1, n2, currRing->cf)
    225 #define nNeg(n)           n_Neg(n, currRing->cf)
    226 #define nSub(n1, n2)      n_Sub(n1, n2, currRing->cf)
    227 #define nGetChar()        nInternalChar(currRing->cf)
    228 #define nInit(i)          n_Init(i, currRing->cf)
    229 #define nIsOne(n)         n_IsOne(n, currRing->cf)
    230 #define nIsMOne(n)        n_IsMOne(n, currRing->cf)
    231 #define nGreaterZero(n)   n_GreaterZero(n, currRing->cf)
    232 #define nWrite(n)         n_Write(n,currRing->cf)
    233 #define nNormalize(n)     n_Normalize(n,currRing->cf)
    234 #define nGcd(a, b)        n_Gcd(a,b,currRing->cf)
    235 #define nIntDiv(a, b)     n_IntDiv(a,b,currRing->cf)
    236 #define nDiv(a, b)        n_Div(a,b,currRing->cf)
    237 #define nInvers(a)        n_Invers(a,currRing->cf)
    238 #define nExactDiv(a, b)   n_ExactDiv(a,b,currRing->cf)
    239 #define nTest(a)          n_Test(a,currRing->cf)
    240 
    241 #define nInpMult(a, b)    n_InpMult(a,b,currRing->cf)
    242 #define nPower(a, b, res) n_Power(a,b,res,currRing->cf)
    243 #define nSize(n)          n_Size(n,currRing->cf)
    244 #define nGetDenom(N)      n_GetDenom((N),currRing->cf)
    245 #define nGetNumerator(N)  n_GetNumerator((N),currRing->cf)
    246 
    247 #define nSetMap(R)        n_SetMap(R,currRing->cf)
    248 
    249 #endif
    250 
     248#endif
     249
Note: See TracChangeset for help on using the changeset viewer.