Changeset 039016 in git for coeffs


Ignore:
Timestamp:
Aug 26, 2010, 5:54:06 PM (14 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
2e6a0618fb4aec3b476ffa839f58c0bbe38e649c
Parents:
17e58bd0adfff2102c82ae041746b1ff6830733c
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-08-26 17:54:06+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:27+01:00
Message:
Fixing nCoeffsEqual and other warnings...

TODO: add "domain->nCoeffIsEqual = n??CoeffsEqual;" to your n??InitChar!
Location:
coeffs
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • coeffs/gnumpc.cc

    r17e58bd r039016  
    221221    return;
    222222  }
    223   if (exp&1==1)
     223  if ( (exp & 1) == 1 )
    224224  {
    225225    ngcPower(x,exp-1,u, r);
     
    374374
    375375
    376 
     376/// test, whether r is an instance of nInitCoeffs(n, parameter)
    377377static BOOLEAN ngcCoeffsEqual(const coeffs r, n_coeffType n, void*)
    378378{
     
    380380 
    381381  return (n == ID);
    382 };
     382}
    383383
    384384void ngcInitChar(coeffs n, void*)
     
    415415  n->cfDBTest  = ndDBTest; // not yet implemented: ngcDBTest
    416416#endif
     417
     418  n->nCoeffIsEqual = ngcCoeffsEqual;
    417419
    418420
  • coeffs/gnumpc.h

    r17e58bd r039016  
    1515/// Initialize r
    1616void ngcInitChar(coeffs r, void*);
    17 
    18 /// test, whether r is an instance of nInitCoeffs(n, parameter) */
    19 static BOOLEAN ngcCoeffsEqual(const coeffs r, n_coeffType n, void* parameter);
    20 
    2117
    2218
  • coeffs/gnumpfl.cc

    r17e58bd r039016  
    381381}
    382382
     383/// test, whether r is an instance of nInitCoeffs(n, parameter)
    383384static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, void*)
    384385{
     
    386387 
    387388  return (n == ID);
    388 };
     389}
    389390
    390391void ngfInitChar(coeffs n, void *)
     
    417418  n->cfDBTest  = ndDBTest; // not yet implemented: ngfDBTest
    418419#endif
     420
     421  n->nCoeffIsEqual = ngfCoeffsEqual;
    419422}
    420423
  • coeffs/gnumpfl.h

    r17e58bd r039016  
    1515/// Initialize r
    1616void ngfInitChar(coeffs r, void *);
    17 
    18 /// test, whether r is an instance of nInitCoeffs(n, parameter) */
    19 static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, void*);
    20 
    2117
    2218const char *   ngfRead (const char *s, number *a, const coeffs r);
  • coeffs/longrat.cc

    r17e58bd r039016  
    25172517  r->cfDBTest=nlDBTest;
    25182518#endif
     2519
     2520  r->nCoeffIsEqual = nlCoeffsEqual;
    25192521 
    25202522  // the variables: general stuff (required)
  • coeffs/longrat.h

    r17e58bd r039016  
    5959
    6060void     nlInitChar(coeffs r, void*);
    61 static BOOLEAN nlCoeffsEqual(const coeffs r, n_coeffType n, void * parameter);
    6261
    6362number   nlInit2 (int i, int j, const coeffs r);
  • coeffs/shortfl.cc

    r17e58bd r039016  
    8787}
    8888
    89 int nrSize(number n, const coeffs R)
     89int nrSize(number n, const coeffs)
    9090{
    9191  float f = nf(n).F();
     
    263263
    264264namespace {
    265 static const char* nrEatr(const char *s, float *r)
    266 {
    267   int i;
    268 
    269   if    (*s >= '0' && *s <= '9')
    270   {
    271     *r = 0.0;
    272     do
    273     {
    274       *r *= 10.0;
    275       i = *s++ - '0';
    276       *r += (float)i;
    277     }
    278     while (*s >= '0' && *s <= '9');
    279   }
    280   else *r = 1.0;
    281   return s;
    282 }
    283 };
     265  static const char* nrEatr(const char *s, float *r)
     266  {
     267    int i;
     268
     269    if    (*s >= '0' && *s <= '9')
     270    {
     271      *r = 0.0;
     272      do
     273      {
     274        *r *= 10.0;
     275        i = *s++ - '0';
     276        *r += (float)i;
     277      }
     278      while (*s >= '0' && *s <= '9');
     279    }
     280    else *r = 1.0;
     281    return s;
     282  }
     283}
    284284
    285285const char * nrRead (const char *s, number *a, const coeffs r)
     
    353353* test valid numbers: not implemented yet
    354354*/
     355#pragma GCC diagnostic ignored "-Wunused-parameter"
    355356BOOLEAN  nrDBTest(number a, const char *f, const int l, const coeffs r)
    356357{
     
    537538
    538539
    539 /// test, whether r is an instance of nInitCoeffs(n, parameter) */
    540 static BOOLEAN nrCoeffsEqual(const coeffs r, n_coeffType n, void* parameter)
     540/// test, whether r is an instance of nInitCoeffs(n, parameter)
     541static BOOLEAN nrCoeffsEqual(const coeffs r, n_coeffType n, void*)
    541542{
    542543  assume( getCoeffType(r) == ID );
    543544
    544545  return (n == ID);
    545 };
    546 
     546}
    547547
    548548
     
    577577#endif
    578578 
    579 
    580 
    581 /// TODO: Any variables?
    582  
    583 }
     579  n->nCoeffIsEqual = nrCoeffsEqual;
     580
     581  // TODO: Any variables?
     582}
  • coeffs/shortfl.h

    r17e58bd r039016  
    1616/// Initialize r
    1717void nrInitChar(coeffs r, void*);
    18 
    19 /// test, whether r is an instance of nInitCoeffs(n, parameter) */
    20 static BOOLEAN nrCoeffsEqual(const coeffs r, n_coeffType n, void* parameter);
    21 
    2218
    2319// Private interface should be hidden!!!
Note: See TracChangeset for help on using the changeset viewer.