Changeset bbf7a8 in git


Ignore:
Timestamp:
May 18, 2010, 3:21:14 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
719c71a80093859b748e9f65da9029c763e2f8d6
Parents:
b6f4bd27ea728a5ffe0529654d02f15c6f6fa2fe
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-05-18 15:21:14+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:52:57+01:00
Message:
init for Q
Location:
coeffs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • coeffs/coeffs.h

    rb6f4bd2 rbbf7a8  
    127127   /// Inline: a := b
    128128   void    (*nInpMult)(number &a, number b, const coeffs r);
    129    number  (*nInit_bigint)(number i, const coeffs src, const coeffs dummy);
     129   /// maps the bigint i into the coeffs dst
     130   number  (*nInit_bigint)(number i, const coeffs dst);
    130131
    131132#ifdef LDEBUG
  • coeffs/longrat.cc

    rb6f4bd2 rbbf7a8  
    293293  }
    294294  number re=nlRInit(1);
    295   mpz_set_d(&(re->z),f);
     295  mpz_set_d(re->z,f);
    296296  memcpy(&(re->n),&h1,sizeof(h1));
    297297  re->s=0; /* not normalized */
     
    370370  if (res->s==0)
    371371    nlNormalize(res,dst);
    372   else if (mpz_size1(&res->z)<=MP_SMALL)
     372  else if (mpz_size1(res->z)<=MP_SMALL)
    373373  {
    374374    // res is new, res->ref is 1
     
    24562456  return z;
    24572457}
     2458
     2459static BOOLEAN nlCoeffsEqual(const coeffs r, n_coeffType n, int parameter)
     2460{
     2461  /* test, if r is an instance of nInitCoeffs(n,parameter) */
     2462  return (n==n_Q);
     2463}
     2464
    24582465void nlInitChar(coeffs r, int ch)
    24592466{
    2460   r->cfInitChar=nlInitChar;
     2467  //r->cfInitChar=nlInitChar;
    24612468  r->cfKillChar=NULL;
    24622469  r->cfSetChar=NULL;
    2463 
    2464   r->cfDelete= nlDelete;
    2465   r->nNormalize=nlNormalize;
    2466   r->cfInit = nlInit;
    2467   r->n_Int  = nlInt;
     2470  r->nCoeffIsEqual=nlCoeffsEqual;
     2471
     2472  r->nMult  = nlMult;
     2473  r->nSub   = nlSub;
    24682474  r->nAdd   = nlAdd;
    2469   r->nSub   = nlSub;
    2470   r->nMult  = nlMult;
    2471   r->nInpMult=nlInpMult;
    24722475  r->nDiv   = nlDiv;
    2473   r->nExactDiv= nlExactDiv;
    24742476  r->nIntDiv= nlIntDiv;
    24752477  r->nIntMod= nlIntMod;
     2478  r->nExactDiv= nlExactDiv;
     2479  r->cfInit = nlInit;
     2480  r->nPar = ndPar;
     2481  r->nParDeg = ndParDeg;
     2482  r->nSize  = nlSize;
     2483  r->n_Int  = nlInt;
     2484  #ifdef HAVE_RINGS
     2485  r->nDivComp = NULL; // only for ring stuff
     2486  r->nIsUnit = NULL; // only for ring stuff
     2487  r->nGetUnit = NULL; // only for ring stuff
     2488  r->nExtGcd = NULL; // only for ring stuff
     2489  #endif
    24762490  r->nNeg   = nlNeg;
    24772491  r->nInvers= nlInvers;
    2478   r->cfCopy  = nlCopy;
     2492  r->cfCopy  = nl_Copy;
     2493  r->nRePart = nl_Copy;
     2494  r->nImPart = ndReturn0;
     2495  r->cfWrite = nlWrite;
     2496  r->nRead = nlRead;
     2497  r->nNormalize=nlNormalize;
    24792498  r->nGreater = nlGreater;
     2499  #ifdef HAVE_RINGS
     2500  r->nDivBy = NULL; // only for ring stuff
     2501  #endif
    24802502  r->nEqual = nlEqual;
    24812503  r->nIsZero = nlIsZero;
     
    24832505  r->nIsMOne = nlIsMOne;
    24842506  r->nGreaterZero = nlGreaterZero;
    2485   r->cfWrite = nlWrite;
    2486   r->nRead = nlRead;
    24872507  r->nPower = nlPower;
     2508  r->cfGetDenom = nlGetDenom;
     2509  r->cfGetNumerator = nlGetNumerator;
    24882510  r->nGcd  = nlGcd;
    24892511  r->nLcm  = nlLcm;
     2512  r->cfDelete= nlDelete;
    24902513  r->cfSetMap = nlSetMap;
    2491   r->nSize  = nlSize;
    2492   r->cfGetDenom = nlGetDenom;
    2493   r->cfGetNumerator = nlGetNumerator;
     2514  r->nName = ndName;
     2515  r->nInpMult=nlInpMult;
     2516  r->nInit_bigint=nl_Copy;
    24942517#ifdef LDEBUG
     2518  // debug stuff
    24952519  r->nDBTest=nlDBTest;
    24962520#endif
     2521 
     2522  // the variables:
     2523  r->nNULL = INT_TO_SR(0);
     2524  r->type = n_Q;
     2525  r->ch = 0;
     2526  r->has_simple_Alloc=FALSE;
     2527  r->has_simple_Inverse=FALSE;
    24972528}
    24982529#if 0
  • coeffs/numbers.cc

    rb6f4bd2 rbbf7a8  
    113113
    114114  // not yet ready:
    115   /*--------------------- Q -----------------*/
    116   if (nField_is_Q(r))
    117   {
    118     r->nInit_bigint=nl_Copy;
    119   }
    120115  #if 0 /* vertagt*/
    121116  /*--------------------- Q_a/ Zp_a -----------------*/
Note: See TracChangeset for help on using the changeset viewer.