Changeset 2336d0 in git


Ignore:
Timestamp:
May 5, 2010, 3:32:25 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
afdd5549fb47d9704dd9bc0d475fe4fb12126213
Parents:
8c484ed8f3ff767d800560901766fe5a4d8eccda
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-05-05 15:32:25+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:51:39+01:00
Message:
cfSetChar for Z/p
Location:
coeffs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • coeffs/coeffs.h

    r8c484e r2336d0  
    131131   void (*cfKillChar)(coeffs r); //  undo all initialisations
    132132                                // or NULL
    133    void (*cfSetChar)(coeffs r); // initialisations after each ring change
     133   void (*cfSetChar)(const coeffs r); // initialisations after each ring change
    134134                                // or NULL
    135135   // general stuff
     
    183183   /// Inline: a := b
    184184   void    (*nInpMult)(number &a, number b, const coeffs r);
    185    number  (*nInit_bigint)(number i, const coeffs r);
     185   number  (*nInit_bigint)(number i, const coeffs src, const coeffs dummy);
    186186
    187187#ifdef LDEBUG
  • coeffs/modulop.cc

    r8c484e r2336d0  
    289289*/
    290290
    291 void npSetChar(int c, coeffs r)
    292 {
    293 
    294 //  if (c==npPrimeM) return;
    295   if ((c>1) || (c<(-1)))
    296   {
    297     if (c>1) r->npPrimeM = c;
    298     else     r->npPrimeM = -c;
    299     r->npPminus1M = r->npPrimeM - 1;
    300 #ifdef NV_OPS
    301     if (r->npPrimeM >NV_MAX_PRIME) return;
    302 #endif
     291void npSetChar(const coeffs r)
     292{
    303293#if !defined(HAVE_DIV_MOD) || !defined(HAVE_MULT_MOD)
    304294    npGen = npExpTable[1];
    305295#endif
    306   }
    307296}
    308297
     
    373362    }
    374363    r->cfKillChar=npKillChar;
     364    r->cfSetChar=npSetChar;
     365    npSetChar(r);
    375366    r->cfSetChar=NULL;
    376367    r->cfInit = npInit;
     368    r->nInit_bigint=npMap0;
    377369    r->n_Int  = npInt;
    378370    r->nAdd   = npAdd;
  • coeffs/modulop.h

    r8c484e r2336d0  
    2323
    2424extern int npGen;
    25 extern long npMapPrime;
    2625
    2726void npInitChar(coeffs r, int ch);
     
    5049#define npTest(A,r)     (0)
    5150#endif
    52 void    npSetChar(int c, coeffs r);
    53 void    npInitChar(int c, coeffs r);
    5451
    5552//int     npGetChar();
    5653
    5754nMapFunc npSetMap(const coeffs src, const coeffs dst);
    58 number  npMapP(number from, const coeffs r);
    59 number  npMap0(number from, const coeffs r);
     55number  npMapP(number from, const coeffs src, const coeffs r);
     56number  npMap0(number from, const coeffs src, const coeffs r);
    6057/*-------specials for spolys, do NOT use otherwise--------------------------*/
    6158/* for npMultM, npSubM, npNegM, npEqualM : */
  • coeffs/numbers.cc

    r8c484e r2336d0  
    115115    r->nInit_bigint=nl_Copy;
    116116  }
     117  #if 0 /* vertagt*/
    117118  /*--------------------- Q_a/ Zp_a -----------------*/
    118119  else if (nField_is_Extension(r))
     
    131132    }
    132133  }
     134  #endif
    133135#ifdef HAVE_RINGS
    134136  /*----------------------ring Z / 2^m----------------*/
     
    161163  {
    162164    npSetChar(c, r);
    163     r->nInit_bigint=npMap0;
    164165  }
    165166  /* -------------- GF(p^m) -----------------------*/
Note: See TracChangeset for help on using the changeset viewer.