Changeset 14b11bb in git


Ignore:
Timestamp:
Apr 29, 2010, 1:41:58 PM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
bfead91247145e45d9f457bafe90b11e57235f21
Parents:
8d0331d269cda0bfa108f83973723bfc04777cd1
git-author:
Frank Seelisch <seelisch@mathematik.uni-kl.de>2010-04-29 13:41:58+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:50:23+01:00
Message:
more changes for Z/n and Z/2^m
Location:
coeffs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • coeffs/numbers.cc

    r8d0331d r14b11bb  
    8080
    8181number ndCopy(number a) { return a; }
    82 number nd_Copy(number a,const coeffs r) { return r->cfCopy(a,r); }
     82number nd_Copy(number a,const coeffs r) { return r->nCopy(a); }
    8383
    8484#ifdef HAVE_RINGS
     
    295295  else if (nField_is_Ring_2toM(r))
    296296  {
    297      nr2mInitExp(c,r);
    298      n->cfInit = nr2mInit;
    299      //n->nCopy  = nr2mCopy;
    300      n->n_Int  = nr2mInt;
    301      n->nAdd   = nr2mAdd;
    302      n->nSub   = nr2mSub;
    303      n->nMult  = nr2mMult;
    304      n->nDiv   = nr2mDiv;
    305      n->nIntDiv       = nr2mIntDiv;
    306      n->nIntMod=nr2mMod;
    307      n->nExactDiv= nr2mDiv;
    308      n->nNeg   = nr2mNeg;
    309      n->nInvers= nr2mInvers;
    310      n->nDivBy = nr2mDivBy;
    311      n->nDivComp = nr2mDivComp;
    312      n->nGreater = nr2mGreater;
    313      n->nEqual = nr2mEqual;
    314      n->nIsZero = nr2mIsZero;
    315      n->nIsOne = nr2mIsOne;
    316      n->nIsMOne = nr2mIsMOne;
    317      n->nGreaterZero = nr2mGreaterZero;
    318      n->cfWrite = nr2mWrite;
    319      n->nRead = nr2mRead;
    320      n->nPower = nr2mPower;
    321      n->cfSetMap = nr2mSetMap;
    322      n->nNormalize = nDummy2;
    323      n->nLcm          = nr2mLcm;
    324      n->nGcd          = nr2mGcd;
    325      n->nIsUnit = nr2mIsUnit;
    326      n->nGetUnit = nr2mGetUnit;
    327      n->nExtGcd = nr2mExtGcd;
    328      n->nName= ndName;
    329 #ifdef LDEBUG
    330      n->nDBTest=nr2mDBTest;
    331 #endif
     297    nr2mCoeffInit(n, c, r->cf);
    332298  }
    333299  /* -------------- Z/n ----------------------- */
    334   else if (nField_is_Ring_ModN(r) || nField_is_Ring_PtoM(r)
    335   )
    336   {
    337      nrnInitExp(c,r);
    338      n->cfInit  = nrnInit;
    339      n->cfDelete= nrnDelete;
    340      n->cfCopy = cfrnCopy;
    341      n->nSize  = nrnSize;
    342      n->n_Int  = nrnInt;
    343      n->nAdd   = nrnAdd;
    344      n->nSub   = nrnSub;
    345      n->nMult  = nrnMult;
    346      n->nDiv   = nrnDiv;
    347      n->nIntDiv= nrnIntDiv;
    348      n->nIntMod= nrnMod;
    349      n->nExactDiv= nrnDiv;
    350      n->nNeg   = nrnNeg;
    351      n->nInvers= nrnInvers;
    352      n->nDivBy = nrnDivBy;
    353      n->nDivComp = nrnDivComp;
    354      n->nGreater = nrnGreater;
    355      n->nEqual = nrnEqual;
    356      n->nIsZero = nrnIsZero;
    357      n->nIsOne = nrnIsOne;
    358      n->nIsMOne = nrnIsMOne;
    359      n->nGreaterZero = nrnGreaterZero;
    360      n->cfWrite = nrnWrite;
    361      n->nRead = nrnRead;
    362      n->nPower = nrnPower;
    363      n->cfSetMap = nrnSetMap;
    364      n->nNormalize = nDummy2;
    365      n->nLcm          = nrnLcm;
    366      n->nGcd          = nrnGcd;
    367      n->nIsUnit = nrnIsUnit;
    368      n->nGetUnit = nrnGetUnit;
    369      n->nExtGcd = nrnExtGcd;
    370      n->nName= nrnName;
    371 #ifdef LDEBUG
    372      n->nDBTest=nrnDBTest;
    373 #endif
     300  else if (nField_is_Ring_ModN(r) || nField_is_Ring_PtoM(r))
     301  {
     302    nrnCoeffInit(n, c, r->cf);
    374303  }
    375304  /* -------------- Z ----------------------- */
     
    378307     n->cfInit  = nrzInit;
    379308     n->cfDelete= nrzDelete;
     309     n->nCopy  = nrzCopy;
    380310     n->cfCopy = cfrzCopy;
    381311     n->nSize  = nrzSize;
     
    430360    n->nNeg   = nlNeg;
    431361    n->nInvers= nlInvers;
    432     //n->nCopy  = nlCopy;
     362    n->nCopy  = nlCopy;
    433363    n->nGreater = nlGreater;
    434364    n->nEqual = nlEqual;
     
    463393    n->nNeg   = npNeg;
    464394    n->nInvers= npInvers;
    465     //n->nCopy  = ndCopy;
     395    n->nCopy  = ndCopy;
    466396    n->nGreater = npGreater;
    467397    n->nEqual = npEqual;
     
    506436    n->nNeg   = nfNeg;
    507437    n->nInvers= nfInvers;
    508     //n->nCopy  = ndCopy;
     438    n->nCopy  = ndCopy;
    509439    n->nGreater = nfGreater;
    510440    n->nEqual = nfEqual;
     
    536466    n->nNeg   = nrNeg;
    537467    n->nInvers= nrInvers;
    538     //n->nCopy  = ndCopy;
     468    n->nCopy  = ndCopy;
    539469    n->nGreater = nrGreater;
    540470    n->nEqual = nrEqual;
     
    566496    n->nNeg   = ngfNeg;
    567497    n->nInvers= ngfInvers;
    568     //n->nCopy  = ngfCopy;
     498    n->nCopy  = ngfCopy;
    569499    n->nGreater = ngfGreater;
    570500    n->nEqual = ngfEqual;
     
    597527    n->nNeg   = ngcNeg;
    598528    n->nInvers= ngcInvers;
    599     //n->nCopy  = ngcCopy;
     529    n->nCopy  = ngcCopy;
    600530    n->nGreater = ngcGreater;
    601531    n->nEqual = ngcEqual;
     
    623553#endif
    624554#ifdef HAVE_RINGS
    625   if (n->nGetUnit==(nMapFunc)NULL) n->nGetUnit=n->cfCopy;
     555  if (n->nGetUnit==(nMapFunc)NULL) n->nGetUnit=n->nCopy;
    626556#endif
    627557  if (!errorreported)
  • coeffs/rmodulo2m.cc

    r8d0331d r14b11bb  
    2323int nr2mExp;
    2424
     25/* for initializing function pointers */
     26void nr2mCoeffInit (n_Procs_s *n, int c, const coeffs r)
     27{
     28     nr2mInitExp(c, r);
     29     n->cfInit  = nr2mInit;
     30     n->cfCopy = nr2mCopy;
     31     n->n_Int  = nr2mInt;
     32     n->nAdd   = nr2mAdd;
     33     n->nSub   = nr2mSub;
     34     n->nMult  = nr2mMult;
     35     n->nDiv   = nr2mDiv;
     36     n->nIntDiv       = nr2mIntDiv;
     37     n->nIntMod=nr2mMod;
     38     n->nExactDiv= nr2mDiv;
     39     n->nNeg   = nr2mNeg;
     40     n->nInvers= nr2mInvers;
     41     n->nDivBy = nr2mDivBy;
     42     n->nDivComp = nr2mDivComp;
     43     n->nGreater = nr2mGreater;
     44     n->nEqual = nr2mEqual;
     45     n->nIsZero = nr2mIsZero;
     46     n->nIsOne = nr2mIsOne;
     47     n->nIsMOne = nr2mIsMOne;
     48     n->nGreaterZero = nr2mGreaterZero;
     49     n->cfWrite = nr2mWrite;
     50     n->nRead = nr2mRead;
     51     n->nPower = nr2mPower;
     52     n->cfSetMap = nr2mSetMap;
     53     n->nNormalize = nDummy2;
     54     n->nLcm          = nr2mLcm;
     55     n->nGcd          = nr2mGcd;
     56     n->nIsUnit = nr2mIsUnit;
     57     n->nGetUnit = nr2mGetUnit;
     58     n->nExtGcd = nr2mExtGcd;
     59     n->nName= ndName;
     60#ifdef LDEBUG
     61     n->nDBTest=nr2mDBTest;
     62#endif
     63}
     64
    2565/*
    2666 * Multiply two numbers
    2767 */
    28 number nr2mMult (number a, number b)
     68number nr2mMult (number a, number b, const coeffs r)
    2969{
    3070  if (((NATNUMBER)a == 0) || ((NATNUMBER)b == 0))
     
    3777 * Give the smallest non unit k, such that a * x = k = b * y has a solution
    3878 */
    39 number nr2mLcm (number a,number b,ring r)
     79number nr2mLcm (number a, number b, const coeffs r)
    4080{
    4181  NATNUMBER res = 0;
     
    60100 * a solution.
    61101 */
    62 number nr2mGcd (number a,number b,ring r)
     102number nr2mGcd (number a, number b, const coeffs r)
    63103{
    64104  NATNUMBER res = 0;
     
    84124 * a solution.
    85125 */
    86 number nr2mExtGcd (number a, number b, number *s, number *t)
     126number nr2mExtGcd (number a, number b, number *s, number *t, const coeffs r)
    87127{
    88128  NATNUMBER res = 0;
     
    108148}
    109149
    110 void nr2mPower (number a, int i, number * result)
     150void nr2mPower (number a, int i, number * result, const coeffs r)
    111151{
    112152  if (i==0)
     
    128168 * create a number from int
    129169 */
    130 number nr2mInit (int i, const ring r)
     170number nr2mInit (int i, const coeffs r)
    131171{
    132172  if (i == 0) return (number)(NATNUMBER)i;
     
    134174  long ii = i;
    135175  NATNUMBER j = (NATNUMBER)1;
    136   if (ii < 0) { j = currRing->nr2mModul; ii = -ii; }
     176  if (ii < 0) { j = r->nr2mModul; ii = -ii; }
    137177  NATNUMBER k = (NATNUMBER)ii;
    138   k = k & currRing->nr2mModul;
     178  k = k & r->nr2mModul;
    139179  /* now we have: from = j * k mod 2^m */
    140180  return (number)nr2mMult((number)j, (number)k);
     
    147187 * automatically casted to int
    148188 */
    149 int nr2mInt(number &n, const ring r)
     189int nr2mInt(number &n, const coeffs r)
    150190{
    151191  NATNUMBER nn = (unsigned long)(NATNUMBER)n & r->nr2mModul;
     
    157197}
    158198
    159 number nr2mAdd (number a, number b)
     199number nr2mAdd (number a, number b, const coeffs r)
    160200{
    161201  return nr2mAddM(a,b);
    162202}
    163203
    164 number nr2mSub (number a, number b)
     204number nr2mSub (number a, number b, const coeffs r)
    165205{
    166206  return nr2mSubM(a,b);
    167207}
    168208
    169 BOOLEAN nr2mIsUnit (number a)
     209BOOLEAN nr2mIsUnit (number a, const coeffs r)
    170210{
    171211  return ((NATNUMBER) a % 2 == 1);
    172212}
    173213
    174 number  nr2mGetUnit (number k)
     214number  nr2mGetUnit (number k, const coeffs r)
    175215{
    176216  if (k == NULL)
     
    182222}
    183223
    184 BOOLEAN nr2mIsZero (number  a)
     224BOOLEAN nr2mIsZero (number a, const coeffs r)
    185225{
    186226  return 0 == (NATNUMBER)a;
    187227}
    188228
    189 BOOLEAN nr2mIsOne (number a)
     229BOOLEAN nr2mIsOne (number a, const coeffs r)
    190230{
    191231  return 1 == (NATNUMBER)a;
    192232}
    193233
    194 BOOLEAN nr2mIsMOne (number a)
    195 {
    196   return (currRing->nr2mModul == (NATNUMBER)a);
    197 }
    198 
    199 BOOLEAN nr2mEqual (number a, number b)
     234BOOLEAN nr2mIsMOne (number a, const coeffs r)
     235{
     236  return (r->nr2mModul  == (NATNUMBER)a)
     237        && (r->nr2mModul != 2);
     238}
     239
     240BOOLEAN nr2mEqual (number a, number b, const coeffs r)
    200241{
    201242  return nr2mEqualM(a,b);
    202243}
    203244
    204 BOOLEAN nr2mGreater (number a, number b)
     245BOOLEAN nr2mGreater (number a, number b, const coeffs r)
    205246{
    206247  return nr2mDivBy(a, b);
     
    211252   2) a, b <> 0; then TRUE iff b/gcd(a, b) is a unit mod 2^m
    212253   TRUE iff b(gcd(a, b) is a unit */
    213 BOOLEAN nr2mDivBy (number a, number b)
     254BOOLEAN nr2mDivBy (number a, number b, const coeffs r)
    214255{
    215256  if (a == NULL)
    216257  {
    217     NATNUMBER c = currRing->nr2mModul + 1;
     258    NATNUMBER c = r->nr2mModul + 1;
    218259    if (c != 0) /* i.e., if no overflow */
    219260      return (c % (NATNUMBER)b) == 0;
     
    233274  else
    234275  {
    235     number n = nr2mGcd(a, b, currRing);
    236     n = nr2mDiv(b, n);
    237     return nr2mIsUnit(n);
    238   }
    239 }
    240 
    241 int nr2mDivComp(number as, number bs)
     276    number n = nr2mGcd(a, b, r);
     277    n = nr2mDiv(b, n, r);
     278    return nr2mIsUnit(n, r);
     279  }
     280}
     281
     282int nr2mDivComp(number as, number bs, const coeffs r)
    242283{
    243284  NATNUMBER a = (NATNUMBER) as;
     
    267308
    268309/* TRUE iff 0 < k <= 2^m / 2 */
    269 BOOLEAN nr2mGreaterZero (number k)
     310BOOLEAN nr2mGreaterZero (number k, const coeffs r)
    270311{
    271312  if ((NATNUMBER)k == 0) return FALSE;
    272   if ((NATNUMBER)k > ((currRing->nr2mModul >> 1) + 1)) return FALSE;
     313  if ((NATNUMBER)k > ((r->nr2mModul >> 1) + 1)) return FALSE;
    273314  return TRUE;
    274315}
     
    278319   and 't' such that a * s + 2^m * t = gcd(a, 2^m) = 1;
    279320   this code will always find a positive 's' */
    280 void specialXGCD(unsigned long& s, unsigned long a)
     321void specialXGCD(unsigned long& s, unsigned long a, const coeffs R)
    281322{
    282323  int_number u = (int_number)omAlloc(sizeof(mpz_t));
     
    289330  mpz_init(u2);
    290331  int_number v = (int_number)omAlloc(sizeof(mpz_t));
    291   mpz_init_set_ui(v, currRing->nr2mModul);
     332  mpz_init_set_ui(v, R->nr2mModul);
    292333  mpz_add_ui(v, v, 1); /* now: v = 2^m */
    293334  int_number v0 = (int_number)omAlloc(sizeof(mpz_t));
     
    319360  {
    320361    /* we add 2^m = (2^m - 1) + 1 to u1: */
    321     mpz_add_ui(u1, u1, currRing->nr2mModul);
     362    mpz_add_ui(u1, u1, R->nr2mModul);
    322363    mpz_add_ui(u1, u1, 1);
    323364  }
     
    336377}
    337378
    338 NATNUMBER InvMod(NATNUMBER a)
     379NATNUMBER InvMod(NATNUMBER a, const coeffs r)
    339380{
    340381  assume((NATNUMBER)a % 2 != 0);
    341382  unsigned long s;
    342   specialXGCD(s, a);
     383  specialXGCD(s, a, r);
    343384  return s;
    344385}
    345386//#endif
    346387
    347 inline number nr2mInversM (number c)
     388inline number nr2mInversM (number c, const coeffs r)
    348389{
    349390  assume((NATNUMBER)c % 2 != 0);
     
    351392}
    352393
    353 number nr2mDiv (number a,number b)
     394number nr2mDiv (number a, number b, const coeffs r)
    354395{
    355396  if ((NATNUMBER)a==0)
     
    375416}
    376417
    377 number nr2mMod (number a, number b)
     418number nr2mMod (number a, number b, const coeffs R)
    378419{
    379420  /*
     
    403444  if (b_div < 0) b_div = -b_div; // b_div now represents |b|
    404445  NATNUMBER r = 0;
    405   while ((g < currRing->nr2mModul) && (b_div > 0) && (b_div % 2 == 0))
     446  while ((g < R->nr2mModul ) && (b_div > 0) && (b_div % 2 == 0))
    406447  {
    407448    b_div = b_div >> 1;
     
    413454}
    414455
    415 number nr2mIntDiv (number a, number b)
     456number nr2mIntDiv (number a, number b, const coeffs r)
    416457{
    417458  if ((NATNUMBER)a == 0)
     
    421462    if ((NATNUMBER)b == 1)
    422463      return (number)0;
    423     NATNUMBER c = currRing->nr2mModul + 1;
     464    NATNUMBER c = r->nr2mModul + 1;
    424465    if (c != 0) /* i.e., if no overflow */
    425466      return (number)(c / (NATNUMBER)b);
     
    428469      /* overflow: c = 2^32 resp. 2^64, depending on platform */
    429470      int_number cc = (int_number)omAlloc(sizeof(mpz_t));
    430       mpz_init_set_ui(cc, currRing->nr2mModul); mpz_add_ui(cc, cc, 1);
     471      mpz_init_set_ui(cc, r->nr2mModul); mpz_add_ui(cc, cc, 1);
    431472      mpz_div_ui(cc, cc, (unsigned long)(NATNUMBER)b);
    432473      unsigned long s = mpz_get_ui(cc);
     
    443484}
    444485
    445 number  nr2mInvers (number c)
     486number  nr2mInvers (number c, const coeffs r)
    446487{
    447488  if ((NATNUMBER)c%2==0)
     
    453494}
    454495
    455 number nr2mNeg (number c)
     496number nr2mNeg (number c, const coeffs r)
    456497{
    457498  if ((NATNUMBER)c==0) return c;
     
    459500}
    460501
    461 number nr2mMapMachineInt(number from)
    462 {
    463   NATNUMBER i = ((NATNUMBER) from) & currRing->nr2mModul;
     502number nr2mMapMachineInt(number from, const coeffs r)
     503{
     504  NATNUMBER i = ((NATNUMBER) from) % r->nr2mModul ;
    464505  return (number) i;
    465506}
    466507
    467 number nr2mCopy(number a)
     508number nr2mCopy(number a, const coeffs)
    468509{
    469510  return a;
    470511}
    471512
    472 number nr2mMapZp(number from)
     513number nr2mMapZp(number from, const coeffs r)
    473514{
    474515  long ii = (long)from;
    475516  NATNUMBER j = (NATNUMBER)1;
    476   if (ii < 0) { j = currRing->nr2mModul; ii = -ii; }
     517  if (ii < 0) { j = r->nr2mModul; ii = -ii; }
    477518  NATNUMBER i = (NATNUMBER)ii;
    478   i = i & currRing->nr2mModul;
     519  i = i & r->nr2mModul;
    479520  /* now we have: from = j * i mod 2^m */
    480521  return (number)nr2mMult((number)i, (number)j);
    481522}
    482523
    483 number nr2mMapQ(number from)
     524number nr2mMapQ(number from, const coeffs r)
    484525{
    485526  int_number erg = (int_number) omAlloc(sizeof(mpz_t));
    486527  mpz_init(erg);
    487528  int_number k = (int_number) omAlloc(sizeof(mpz_t));
    488   mpz_init_set_ui(k, currRing->nr2mModul);
     529  mpz_init_set_ui(k, r->nr2mModul);
    489530
    490531  nlGMP(from, (number)erg);
    491532  mpz_and(erg, erg, k);
    492   number r = (number)mpz_get_ui(erg);
     533  number res = (number)mpz_get_ui(erg);
    493534
    494535  mpz_clear(erg); omFree((ADDRESS)erg);
    495536  mpz_clear(k);   omFree((ADDRESS)k);
    496537
    497   return (number) r;
    498 }
    499 
    500 number nr2mMapGMP(number from)
     538  return (number) res;
     539}
     540
     541number nr2mMapGMP(number from, const coeffs r)
    501542{
    502543  int_number erg = (int_number) omAlloc(sizeof(mpz_t));
    503544  mpz_init(erg);
    504545  int_number k = (int_number) omAlloc(sizeof(mpz_t));
    505   mpz_init_set_ui(k, currRing->nr2mModul);
     546  mpz_init_set_ui(k, r->nr2mModul);
    506547
    507548  mpz_and(erg, (int_number)from, k);
    508   number r = (number) mpz_get_ui(erg);
     549  number res = (number) mpz_get_ui(erg);
    509550
    510551  mpz_clear(erg); omFree((ADDRESS)erg);
    511552  mpz_clear(k);   omFree((ADDRESS)k);
    512553
    513   return (number) r;
     554  return (number) res;
    514555}
    515556
     
    568609 */
    569610
    570 void nr2mSetExp(int m, const ring r)
     611void nr2mSetExp(int m, const coeffs r)
    571612{
    572613  if (m > 1)
     
    585626}
    586627
    587 void nr2mInitExp(int m, const ring r)
     628void nr2mInitExp(int m, const coeffs r)
    588629{
    589630  nr2mSetExp(m, r);
     
    592633
    593634#ifdef LDEBUG
    594 BOOLEAN nr2mDBTest (number a, const char *f, const int l)
     635BOOLEAN nr2mDBTest (number a, const char *f, const int l, const coeffs r)
    595636{
    596637  if ((NATNUMBER)a < 0) return FALSE;
    597   if (((NATNUMBER)a & currRing->nr2mModul) != (NATNUMBER)a) return FALSE;
     638  if (((NATNUMBER)a & r->nr2mModul) != (NATNUMBER)a) return FALSE;
    598639  return TRUE;
    599640}
    600641#endif
    601642
    602 void nr2mWrite (number &a, const ring r)
     643void nr2mWrite (number &a, const coeffs r)
    603644{
    604645  int i = nr2mInt(a, r);
     
    606647}
    607648
    608 static const char* nr2mEati(const char *s, int *i)
     649static const char* nr2mEati(const char *s, int *i, const coeffs r)
    609650{
    610651
     
    616657      (*i) *= 10;
    617658      (*i) += *s++ - '0';
    618       if ((*i) >= (MAX_INT_VAL / 10)) (*i) = (*i) & currRing->nr2mModul;
     659      if ((*i) >= (MAX_INT_VAL / 10)) (*i) = (*i) & r->nr2mModul;
    619660    }
    620661    while (((*s) >= '0') && ((*s) <= '9'));
    621     (*i) = (*i) & currRing->nr2mModul;
     662    (*i) = (*i) & r->nr2mModul;
    622663  }
    623664  else (*i) = 1;
     
    625666}
    626667
    627 const char * nr2mRead (const char *s, number *a)
     668const char * nr2mRead (const char *s, number *a, const coeffs r)
    628669{
    629670  int z;
  • coeffs/rmodulo2m.h

    r8d0331d r14b11bb  
    1414extern NATNUMBER nr2mModul; /* for storing 2^m - 1, i.e., the
    1515                               bit pattern '11..1' of length m */
     16
     17/* next method is for initializing function pointers */
     18void    nr2mCoeffInit   (n_Procs_s *n, int c, const coeffs r);
    1619
    1720number  nr2mCopy        (number a, const coeffs r);
  • coeffs/rmodulon.cc

    r8d0331d r14b11bb  
    2626unsigned long nrnExponent = 0;
    2727
     28/* for initializing function pointers */
     29void nrnCoeffInit (n_Procs_s *n, int c, const coeffs r)
     30{
     31     nrnInitExp(c, r);
     32     n->cfInit  = nrnInit;
     33     n->cfDelete= nrnDelete;
     34     n->cfCopy = nrnCopy;
     35     n->nSize  = nrnSize;
     36     n->n_Int  = nrnInt;
     37     n->nAdd   = nrnAdd;
     38     n->nSub   = nrnSub;
     39     n->nMult  = nrnMult;
     40     n->nDiv   = nrnDiv;
     41     n->nIntDiv= nrnIntDiv;
     42     n->nIntMod= nrnMod;
     43     n->nExactDiv= nrnDiv;
     44     n->nNeg   = nrnNeg;
     45     n->nInvers= nrnInvers;
     46     n->nDivBy = nrnDivBy;
     47     n->nDivComp = nrnDivComp;
     48     n->nGreater = nrnGreater;
     49     n->nEqual = nrnEqual;
     50     n->nIsZero = nrnIsZero;
     51     n->nIsOne = nrnIsOne;
     52     n->nIsMOne = nrnIsMOne;
     53     n->nGreaterZero = nrnGreaterZero;
     54     n->cfWrite = nrnWrite;
     55     n->nRead = nrnRead;
     56     n->nPower = nrnPower;
     57     n->cfSetMap = nrnSetMap;
     58     n->nNormalize = nDummy2;
     59     n->nLcm          = nrnLcm;
     60     n->nGcd          = nrnGcd;
     61     n->nIsUnit = nrnIsUnit;
     62     n->nGetUnit = nrnGetUnit;
     63     n->nExtGcd = nrnExtGcd;
     64     n->nName= nrnName;
     65#ifdef LDEBUG
     66     n->nDBTest=nrnDBTest;
     67#endif
     68}
     69
    2870/*
    2971 * create a number from int
    3072 */
    31 number nrnInit (int i, const ring r)
     73number nrnInit (int i, const coeffs r)
    3274{
    3375  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    3779}
    3880
    39 void nrnDelete(number *a, const ring r)
     81void nrnDelete(number *a, const coeffs r)
    4082{
    4183  if (*a == NULL) return;
     
    4587}
    4688
    47 number nrnCopy(number a)
     89number nrnCopy(number a, const coeffs r)
    4890{
    4991  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    5294}
    5395
    54 number cfrnCopy(number a, const ring r)
    55 {
    56   return nrnCopy(a);
    57 }
    58 
    59 int nrnSize(number a)
     96int nrnSize(number a, const coeffs r)
    6097{
    6198  if (a == NULL) return 0;
     
    66103 * convert a number to int
    67104 */
    68 int nrnInt(number &n, const ring r)
     105int nrnInt(number &n, const coeffs r)
    69106{
    70107  return (int) mpz_get_si( (int_number) n);
     
    74111 * Multiply two numbers
    75112 */
    76 number nrnMult (number a, number b)
     113number nrnMult (number a, number b, const coeffs r)
    77114{
    78115  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    79116  mpz_init(erg);
    80117  mpz_mul(erg, (int_number) a, (int_number) b);
    81   mpz_mod(erg, erg, currRing->nrnModul);
    82   return (number) erg;
    83 }
    84 
    85 void nrnPower (number a, int i, number * result)
    86 {
    87   int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    88   mpz_init(erg);
    89   mpz_powm_ui(erg, (int_number) a, i, currRing->nrnModul);
     118  mpz_mod(erg, erg, r->nrnModul);
     119  return (number) erg;
     120}
     121
     122void nrnPower (number a, int i, number * result, const coeffs r)
     123{
     124  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     125  mpz_init(erg);
     126  mpz_powm_ui(erg, (int_number) a, i, r->nrnModul);
    90127  *result = (number) erg;
    91128}
    92129
    93 number nrnAdd (number a, number b)
     130number nrnAdd (number a, number b, const coeffs r)
    94131{
    95132  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    96133  mpz_init(erg);
    97134  mpz_add(erg, (int_number) a, (int_number) b);
    98   mpz_mod(erg, erg, currRing->nrnModul);
    99   return (number) erg;
    100 }
    101 
    102 number nrnSub (number a, number b)
     135  mpz_mod(erg, erg, r->nrnModul);
     136  return (number) erg;
     137}
     138
     139number nrnSub (number a, number b, const coeffs r)
    103140{
    104141  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    105142  mpz_init(erg);
    106143  mpz_sub(erg, (int_number) a, (int_number) b);
    107   mpz_mod(erg, erg, currRing->nrnModul);
    108   return (number) erg;
    109 }
    110 
    111 number nrnNeg (number c)
     144  mpz_mod(erg, erg, r->nrnModul);
     145  return (number) erg;
     146}
     147
     148number nrnNeg (number c, const coeffs r)
    112149{
    113150// nNeg inplace !!!
    114   mpz_sub((int_number) c, currRing->nrnModul, (int_number) c);
     151  mpz_sub((int_number) c, r->nrnModul, (int_number) c);
    115152  return c;
    116153}
    117154
    118 number  nrnInvers (number c)
    119 {
    120   int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    121   mpz_init(erg);
    122   mpz_invert(erg, (int_number) c, currRing->nrnModul);
     155number  nrnInvers (number c, const coeffs r)
     156{
     157  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     158  mpz_init(erg);
     159  mpz_invert(erg, (int_number) c, r->nrnModul);
    123160  return (number) erg;
    124161}
     
    128165 * TODO: lcm(gcd,gcd) besser als gcd(lcm) ?
    129166 */
    130 number nrnLcm (number a,number b,ring r)
     167number nrnLcm (number a, number b, const coeffs r)
    131168{
    132169  number erg = nrnGcd(NULL, a, r);
     
    141178 * a solution.
    142179 */
    143 number nrnGcd (number a,number b,ring r)
     180number nrnGcd (number a, number b, const coeffs r)
    144181{
    145182  if ((a == NULL) && (b == NULL)) return nrnInit(0,r);
     
    170207 * a solution and r, s, s.t. k = s*a + t*b
    171208 */
    172 number  nrnExtGcd (number a, number b, number *s, number *t)
     209number  nrnExtGcd (number a, number b, number *s, number *t, const coeffs r)
    173210{
    174211  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    179216  mpz_init(bt);
    180217  mpz_gcdext(erg, bs, bt, (int_number) a, (int_number) b);
    181   mpz_mod(bs, bs, currRing->nrnModul);
    182   mpz_mod(bt, bt, currRing->nrnModul);
     218  mpz_mod(bs, bs, r->nrnModul);
     219  mpz_mod(bt, bt, r->nrnModul);
    183220  *s = (number) bs;
    184221  *t = (number) bt;
     
    186223}
    187224
    188 BOOLEAN nrnIsZero (number  a)
     225BOOLEAN nrnIsZero (number a, const coeffs r)
    189226{
    190227#ifdef LDEBUG
     
    194231}
    195232
    196 BOOLEAN nrnIsOne (number a)
     233BOOLEAN nrnIsOne (number a, const coeffs r)
    197234{
    198235#ifdef LDEBUG
     
    202239}
    203240
    204 BOOLEAN nrnIsMOne (number a)
     241BOOLEAN nrnIsMOne (number a, const coeffs r)
    205242{
    206243#ifdef LDEBUG
     
    210247}
    211248
    212 BOOLEAN nrnEqual (number a,number b)
     249BOOLEAN nrnEqual (number a, number b, const coeffs r)
    213250{
    214251  return 0 == mpz_cmp((int_number) a, (int_number) b);
    215252}
    216253
    217 BOOLEAN nrnGreater (number a,number b)
     254BOOLEAN nrnGreater (number a, number b, const coeffs r)
    218255{
    219256  return 0 < mpz_cmp((int_number) a, (int_number) b);
    220257}
    221258
    222 BOOLEAN nrnGreaterZero (number k)
     259BOOLEAN nrnGreaterZero (number k, const coeffs r)
    223260{
    224261  return 0 < mpz_cmp_si((int_number) k, 0);
    225262}
    226263
    227 BOOLEAN nrnIsUnit (number a)
    228 {
    229   number tmp = nrnGcd(a, (number) currRing->nrnModul, currRing);
     264BOOLEAN nrnIsUnit (number a, const coeffs r)
     265{
     266  number tmp = nrnGcd(a, (number) r->nrnModul, r);
    230267  bool res = nrnIsOne(tmp);
    231268  nrnDelete(&tmp, NULL);
     
    233270}
    234271
    235 number  nrnGetUnit (number k)
    236 {
    237   if (mpz_divisible_p(currRing->nrnModul, (int_number) k)) return nrnInit(1,currRing);
    238 
    239   int_number unit = (int_number) nrnGcd(k, 0, currRing);
     272number  nrnGetUnit (number k, const coeffs r)
     273{
     274  if (mpz_divisible_p(r->nrnModul, (int_number) k)) return nrnInit(1,r);
     275
     276  int_number unit = (int_number) nrnGcd(k, 0, r);
    240277  mpz_tdiv_q(unit, (int_number) k, unit);
    241   int_number gcd = (int_number) nrnGcd((number) unit, 0, currRing);
     278  int_number gcd = (int_number) nrnGcd((number) unit, 0, r);
    242279  if (!nrnIsOne((number) gcd))
    243280  {
     
    246283    int_number tmp = (int_number) nrnMult((number) unit,(number) unit);
    247284    // gcd_new := gcd(tmp, 0)
    248     int_number gcd_new = (int_number) nrnGcd((number) tmp, 0, currRing);
     285    int_number gcd_new = (int_number) nrnGcd((number) tmp, 0, r);
    249286    while (!nrnEqual((number) gcd_new,(number) gcd))
    250287    {
     
    255292      // tmp := tmp * unit
    256293      mpz_mul(tmp, tmp, unit);
    257       mpz_mod(tmp, tmp, currRing->nrnModul);
     294      mpz_mod(tmp, tmp, r->nrnModul);
    258295      // gcd_new := gcd(tmp, 0)
    259       mpz_gcd(gcd_new, tmp, currRing->nrnModul);
     296      mpz_gcd(gcd_new, tmp, r->nrnModul);
    260297    }
    261298    // unit := unit + nrnModul / gcd_new
    262     mpz_tdiv_q(tmp, currRing->nrnModul, gcd_new);
     299    mpz_tdiv_q(tmp, r->nrnModul, gcd_new);
    263300    mpz_add(unit, unit, tmp);
    264     mpz_mod(unit, unit, currRing->nrnModul);
     301    mpz_mod(unit, unit, r->nrnModul);
    265302    nrnDelete((number*) &gcd_new, NULL);
    266303    nrnDelete((number*) &tmp, NULL);
     
    270307}
    271308
    272 BOOLEAN nrnDivBy (number a, number b)
     309BOOLEAN nrnDivBy (number a, number b, const coeffs r)
    273310{
    274311  if (a == NULL)
    275     return mpz_divisible_p(currRing->nrnModul, (int_number)b);
     312    return mpz_divisible_p(r->nrnModul, (int_number) b);
    276313  else
    277314  { /* b divides a iff b/gcd(a, b) is a unit in the given ring: */
    278     number n = nrnGcd(a, b, currRing);
     315    number n = nrnGcd(a, b, r);
    279316    mpz_tdiv_q((int_number)n, (int_number)b, (int_number)n);
    280     bool result = nrnIsUnit(n);
     317    bool result = nrnIsUnit(n, r);
    281318    nrnDelete(&n, NULL);
    282319    return result;
     
    284321}
    285322
    286 int nrnDivComp(number a, number b)
     323int nrnDivComp(number a, number b, const coeffs r)
    287324{
    288325  if (nrnEqual(a, b)) return 2;
     
    292329}
    293330
    294 number nrnDiv (number a,number b)
    295 {
    296   if (a == NULL) a = (number) currRing->nrnModul;
     331number nrnDiv (number a, number b, const coeffs r)
     332{
     333  if (a == NULL) a = (number) r->nrnModul;
    297334  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    298335  mpz_init(erg);
     
    304341  else
    305342  {
    306     int_number gcd = (int_number) nrnGcd(a, b, currRing);
     343    int_number gcd = (int_number) nrnGcd(a, b, r);
    307344    mpz_divexact(erg, (int_number) b, gcd);
    308345    if (!nrnIsUnit((number) erg))
     
    320357    nrnDelete((number*) &gcd, NULL);
    321358    nrnDelete((number*) &tmp, NULL);
    322     mpz_mod(erg, erg, currRing->nrnModul);
     359    mpz_mod(erg, erg, r->nrnModul);
    323360    return (number) erg;
    324361  }
    325362}
    326363
    327 number nrnMod (number a, number b)
     364number nrnMod (number a, number b, const coeffs r)
    328365{
    329366  /*
     
    350387  mpz_init(g);
    351388  mpz_init_set_si(r,(long)0);
    352   mpz_gcd(g, (int_number) currRing->nrnModul, (int_number)b); // g is now as above
     389  mpz_gcd(g, (int_number) r->nrnModul, (int_number)b); // g is now as above
    353390  if (mpz_cmp_si(g, (long)1) != 0) mpz_mod(r, (int_number)a, g); // the case g <> 1
    354391  mpz_clear(g);
     
    357394}
    358395
    359 number nrnIntDiv (number a,number b)
    360 {
    361   int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    362   mpz_init(erg);
    363   if (a == NULL) a = (number) currRing->nrnModul;
     396number nrnIntDiv (number a, number b, const coeffs r)
     397{
     398  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     399  mpz_init(erg);
     400  if (a == NULL) a = (number) r->nrnModul;
    364401  mpz_tdiv_q(erg, (int_number) a, (int_number) b);
    365402  return (number) erg;
     
    372409int_number nrnMapCoef = NULL;
    373410
    374 number nrnMapModN(number from)
     411number nrnMapModN(number from, const coeffs r)
    375412{
    376413  return nrnMult(from, (number) nrnMapCoef);
    377414}
    378415
    379 number nrnMap2toM(number from)
     416number nrnMap2toM(number from, const coeffs r)
    380417{
    381418  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    382419  mpz_init(erg);
    383420  mpz_mul_ui(erg, nrnMapCoef, (NATNUMBER) from);
    384   mpz_mod(erg, erg, currRing->nrnModul);
    385   return (number) erg;
    386 }
    387 
    388 number nrnMapZp(number from)
     421  mpz_mod(erg, erg, r->nrnModul);
     422  return (number) erg;
     423}
     424
     425number nrnMapZp(number from, const coeffs r)
    389426{
    390427  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    391428  mpz_init(erg);
    392429  mpz_mul_si(erg, nrnMapCoef, (NATNUMBER) from);
    393   mpz_mod(erg, erg, currRing->nrnModul);
    394   return (number) erg;
    395 }
    396 
    397 number nrnMapGMP(number from)
    398 {
    399   int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    400   mpz_init(erg);
    401   mpz_mod(erg, (int_number) from, currRing->nrnModul);
    402   return (number) erg;
    403 }
    404 
    405 number nrnMapQ(number from)
     430  mpz_mod(erg, erg, r->nrnModul);
     431  return (number) erg;
     432}
     433
     434number nrnMapGMP(number from, const coeffs r)
     435{
     436  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     437  mpz_init(erg);
     438  mpz_mod(erg, (int_number) from, r->nrnModul);
     439  return (number) erg;
     440}
     441
     442number nrnMapQ(number from, const coeffs r)
    406443{
    407444  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    408445  mpz_init(erg);
    409446  nlGMP(from, (number) erg);
    410   mpz_mod(erg, erg, currRing->nrnModul);
     447  mpz_mod(erg, erg, r->nrnModul);
    411448  return (number) erg;
    412449}
     
    414451nMapFunc nrnSetMap(const ring src, const ring dst)
    415452{
    416   /* dst = currRing */
     453  /* dst = currRing->cf */
    417454  if (rField_is_Ring_Z(src))
    418455  {
     
    450487        mpz_init(nrnMapCoef);
    451488      }
    452       if (mpz_divisible_p(nrnMapModul, currRing->nrnModul))
     489      if (mpz_divisible_p(nrnMapModul, r->nrnModul))
    453490      {
    454491        mpz_set_si(nrnMapCoef, 1);
     
    457494      if (nrnDivBy(NULL, (number) nrnMapModul))
    458495      {
    459         mpz_divexact(nrnMapCoef, currRing->nrnModul, nrnMapModul);
    460         int_number tmp = currRing->nrnModul;
    461         currRing->nrnModul = nrnMapModul;
     496        mpz_divexact(nrnMapCoef, r->nrnModul, nrnMapModul);
     497        int_number tmp = r->nrnModul;
     498        r->nrnModul = nrnMapModul;
    462499        if (!nrnIsUnit((number) nrnMapCoef))
    463500        {
    464           currRing->nrnModul = tmp;
    465           nrnDelete((number*) &nrnMapModul, currRing);
     501          r->nrnModul = tmp;
     502          nrnDelete((number*) &nrnMapModul, r);
    466503          return NULL;
    467504        }
    468505        int_number inv = (int_number) nrnInvers((number) nrnMapCoef);
    469         currRing->nrnModul = tmp;
     506        r->nrnModul = tmp;
    470507        mpz_mul(nrnMapCoef, nrnMapCoef, inv);
    471         mpz_mod(nrnMapCoef, nrnMapCoef, currRing->nrnModul);
    472         nrnDelete((number*) &inv, currRing);
     508        mpz_mod(nrnMapCoef, nrnMapCoef, r->nrnModul);
     509        nrnDelete((number*) &inv, r);
    473510      }
    474511      else
    475512      {
    476         nrnDelete((number*) &nrnMapModul, currRing);
     513        nrnDelete((number*) &nrnMapModul, r);
    477514        return NULL;
    478515      }
    479       nrnDelete((number*) &nrnMapModul, currRing);
     516      nrnDelete((number*) &nrnMapModul, r);
    480517      if (rField_is_Ring_2toM(src))
    481518        return nrnMap2toM;
     
    493530 */
    494531
    495 void nrnSetExp(int m, ring r)
     532void nrnSetExp(int m, const coeffs r)
    496533{
    497534  if ((r->nrnModul != NULL) && (mpz_cmp(r->nrnModul, r->ringflaga) == 0) && (nrnExponent == r->ringflagb)) return;
     
    510547}
    511548
    512 void nrnInitExp(int m, ring r)
     549void nrnInitExp(int m, const coeffs r)
    513550{
    514551  nrnSetExp(m, r);
     
    521558
    522559#ifdef LDEBUG
    523 BOOLEAN nrnDBTest (number a, const char *f, const int l)
     560BOOLEAN nrnDBTest (number a, const char *f, const int l, const coeffs r)
    524561{
    525562  if (a==NULL) return TRUE;
    526   if ( (mpz_cmp_si((int_number) a, 0) < 0) || (mpz_cmp((int_number) a, currRing->nrnModul) > 0) )
     563  if ( (mpz_cmp_si((int_number) a, 0) < 0) || (mpz_cmp((int_number) a, r->nrnModul) > 0) )
    527564  {
    528565    return FALSE;
     
    559596}
    560597
    561 const char * nrnRead (const char *s, number *a)
     598const char * nrnRead (const char *s, number *a, const coeffs r)
    562599{
    563600  int_number z = (int_number) omAllocBin(gmp_nrz_bin);
     
    565602    s = nlCPEatLongC((char *)s, z);
    566603  }
    567   mpz_mod(z, z, currRing->nrnModul);
     604  mpz_mod(z, z, r->nrnModul);
    568605  *a = (number) z;
    569606  return s;
  • coeffs/rmodulon.h

    r8d0331d r14b11bb  
    1515#endif
    1616
    17 number  cfrnCopy       (number a, const ring r);
    18 int     nrnSize        (number a, const ring r);
    19 void    nrnDelete      (number *a, const ring r);
    20 BOOLEAN nrnGreaterZero (number k, const ring r);
    21 number  nrnMult        (number a, number b, const ring r);
    22 number  nrnInit        (int i, const ring r);
    23 int     nrnInt         (number &n, const ring r);
    24 number  nrnAdd         (number a, number b, const ring r);
    25 number  nrnSub         (number a, number b, const ring r);
    26 void    nrnPower       (number a, int i, number * result, const ring r);
    27 BOOLEAN nrnIsZero      (number a, const ring r);
    28 BOOLEAN nrnIsOne       (number a, const ring r);
    29 BOOLEAN nrnIsMOne      (number a, const ring r);
    30 BOOLEAN nrnIsUnit      (number a, const ring r);
    31 number  nrnGetUnit     (number a, const ring r);
    32 number  nrnDiv         (number a, number b, const ring r);
    33 number  nrnMod         (number a,number b, const ring r);
    34 number  nrnIntDiv      (number a,number b, const ring r);
    35 number  nrnNeg         (number c, const ring r);
    36 number  nrnInvers      (number c, const ring r);
    37 BOOLEAN nrnGreater     (number a, number b, const ring r);
    38 BOOLEAN nrnDivBy       (number a, number b, const ring r);
    39 int     nrnDivComp     (number a, number b, const ring r);
    40 BOOLEAN nrnEqual       (number a, number b, const ring r);
    41 number  nrnLcm         (number a,number b, const ring r);
    42 number  nrnGcd         (number a,number b, const ring r);
    43 number  nrnExtGcd      (number a, number b, number *s, number *t, const ring r);
    44 nMapFunc nrnSetMap     (const ring src, const ring dst);
     17/* next method is for initializing function pointers */
     18void    nrnCoeffInit   (n_Procs_s *n, int c, const coeffs r);
     19
     20number  nrnCopy        (number a, const coeffs r);
     21int     nrnSize        (number a, const coeffs r);
     22void    nrnDelete      (number *a, const coeffs r);
     23BOOLEAN nrnGreaterZero (number k, const coeffs r);
     24number  nrnMult        (number a, number b, const coeffs r);
     25number  nrnInit        (int i, const coeffs r);
     26int     nrnInt         (number &n, const coeffs r);
     27number  nrnAdd         (number a, number b, const coeffs r);
     28number  nrnSub         (number a, number b, const coeffs r);
     29void    nrnPower       (number a, int i, number * result, const coeffs r);
     30BOOLEAN nrnIsZero      (number a, const coeffs r);
     31BOOLEAN nrnIsOne       (number a, const coeffs r);
     32BOOLEAN nrnIsMOne      (number a, const coeffs r);
     33BOOLEAN nrnIsUnit      (number a, const coeffs r);
     34number  nrnGetUnit     (number a, const coeffs r);
     35number  nrnDiv         (number a, number b, const coeffs r);
     36number  nrnMod         (number a,number b, const coeffs r);
     37number  nrnIntDiv      (number a,number b, const coeffs r);
     38number  nrnNeg         (number c, const coeffs r);
     39number  nrnInvers      (number c, const coeffs r);
     40BOOLEAN nrnGreater     (number a, number b, const coeffs r);
     41BOOLEAN nrnDivBy       (number a, number b, const coeffs r);
     42int     nrnDivComp     (number a, number b, const coeffs r);
     43BOOLEAN nrnEqual       (number a, number b, const coeffs r);
     44number  nrnLcm         (number a,number b, const coeffs r);
     45number  nrnGcd         (number a,number b, const coeffs r);
     46number  nrnExtGcd      (number a, number b, number *s, number *t, const coeffs r);
     47nMapFunc nrnSetMap     (const coeffs src, const coeffs dst);
    4548#define  nrnWrite      nrzWrite
    46 const char *  nrnRead  (const char *s, number *a, const ring r);
    47 char *  nrnName        (number n, const ring r);
     49const char *  nrnRead  (const char *s, number *a, const coeffs r);
     50char *  nrnName        (number n, const coeffs r);
    4851#ifdef LDEBUG
    49 BOOLEAN nrnDBTest      (number a, const char *f, const int l, const ring r);
     52BOOLEAN nrnDBTest      (number a, const char *f, const int l, const coeffs r);
    5053#endif
    51 void    nrnSetExp(int c, const ring r);
    52 void    nrnInitExp(int c, const ring r);
     54void    nrnSetExp(int c, const coeffs r);
     55void    nrnInitExp(int c, const coeffs r);
    5356
    5457#endif
Note: See TracChangeset for help on using the changeset viewer.