Changeset 121fd9 in git for libpolys


Ignore:
Timestamp:
May 11, 2011, 1:29:30 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ca1eb1a729253498d9506a95c9dc7fbaa646acc6
Parents:
50612e2a61efff5f199e310834c46d4452b2cf8d
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-05-11 13:29:30+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:03+01:00
Message:
add: ndCoeffsIsEqual: generic case,parameter unsed
fix: some "unused parameter" warnings
Location:
libpolys/coeffs
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/ffields.cc

    r50612e2 r121fd9  
    184184* the generating element `z`
    185185*/
    186 number nfPar (int i, const coeffs r)
    187 {
     186number nfPar (int i, const coeffs)
     187{
     188  assume(i==1);
    188189  return (number)1;
    189190}
  • libpolys/coeffs/gnumpc.cc

    r50612e2 r121fd9  
    4242{
    4343  assume( getCoeffType(r) == ID );
     44  assume(i==1);
    4445
    4546  gmp_complex* n= new gmp_complex( (long)0, (long)1 );
     
    371372    omFree( (void *)out );
    372373  }
    373 }
    374 
    375 
    376 
    377 /// test, whether r is an instance of nInitCoeffs(n, parameter)
    378 static BOOLEAN ngcCoeffsEqual(const coeffs r, n_coeffType n, void*)
    379 {
    380   assume( getCoeffType(r) == ID );
    381  
    382   return (n == ID);
    383374}
    384375
     
    419410#endif
    420411
    421   n->nCoeffIsEqual = ngcCoeffsEqual;
     412  n->nCoeffIsEqual = ndCoeffIsEqual;
    422413
    423414
     
    489480/// TODO: Any variables?
    490481  if( p == NULL )
    491     n->complex_parameter = "i"; //??
     482    n->complex_parameter = omStrDup((char*)"i");
    492483  else
    493484    n->complex_parameter = omStrDup( (char*) p );
  • libpolys/coeffs/gnumpfl.cc

    r50612e2 r121fd9  
    381381}
    382382
    383 /// test, whether r is an instance of nInitCoeffs(n, parameter)
    384 static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, void*)
    385 {
    386   assume( getCoeffType(r) == ID );
    387  
    388   return (n == ID);
    389 }
    390 
    391383BOOLEAN ngfInitChar(coeffs n, void *)
    392384{
     
    421413#endif
    422414
    423   n->nCoeffIsEqual = ngfCoeffsEqual;
     415  n->nCoeffIsEqual = ndCoeffIsEqual;
    424416  return FALSE;
    425417}
  • libpolys/coeffs/longrat.cc

    r50612e2 r121fd9  
    499499//}
    500500
    501 int nlSize(number a, const coeffs r)
     501int nlSize(number a, const coeffs)
    502502{
    503503  if (a==INT_TO_SR(0))
     
    20982098}
    20992099
    2100 LINLINE BOOLEAN nlIsZero (number a, const coeffs r)
     2100LINLINE BOOLEAN nlIsZero (number a, const coeffs)
    21012101{
    21022102  return (a==INT_TO_SR(0));
     
    21072107* copy a to b
    21082108*/
    2109 LINLINE number nlCopy(number a, const coeffs r)
     2109LINLINE number nlCopy(number a, const coeffs)
    21102110{
    21112111  if ((SR_HDL(a) & SR_INT)||(a==NULL))
     
    25172517}
    25182518
    2519 static BOOLEAN nlCoeffsEqual(const coeffs r, n_coeffType n, void * parameter)
    2520 {
    2521   /* test, if r is an instance of nInitCoeffs(n,parameter) */
    2522   return (n==n_Q);
    2523 }
    2524 
    25252519void    nlCoeffWrite  (const coeffs r)
    25262520{
     
    25342528  r->cfKillChar=NULL;
    25352529  r->cfSetChar=NULL;
    2536   r->nCoeffIsEqual=nlCoeffsEqual;
     2530  r->nCoeffIsEqual=ndCoeffIsEqual;
    25372531  r->cfKillChar = ndKillChar; /* dummy */
    25382532
     
    25862580#endif
    25872581
    2588   r->nCoeffIsEqual = nlCoeffsEqual;
    2589  
    25902582  // the variables: general stuff (required)
    25912583  r->nNULL = INT_TO_SR(0);
  • libpolys/coeffs/numbers.cc

    r50612e2 r121fd9  
    9393int    ndParDeg(number n, const coeffs r) { return 0; }
    9494
    95 number ndGcd(number a, number b, const coeffs r) { return n_Init(1,r); }
    96 
    97 number ndIntMod(number a, number b, const coeffs r) { return n_Init(0,r); }
    98 
    99 number ndGetDenom(number &n, const coeffs r) { return n_Init(1,r); }
     95number ndGcd(number, number, const coeffs r) { return n_Init(1,r); }
     96
     97number ndIntMod(number, number, const coeffs r) { return n_Init(0,r); }
     98
     99number ndGetDenom(number &, const coeffs r) { return n_Init(1,r); }
    100100number ndGetNumerator(number &a,const coeffs r) { return n_Copy(a,r); }
    101101
     
    136136#endif
    137137
    138 number  ndInit_bigint(number i, const coeffs dummy, const coeffs dst)
     138number  ndInit_bigint(number, const coeffs, const coeffs)
    139139{
    140140  Werror("no conversion from bigint to this field");
    141141  return NULL;
     142}
     143
     144
     145BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *)
     146{
     147  /* test, if r is an instance of nInitCoeffs(n,parameter) */
     148  /* if paramater is not needed */
     149  return (n==r->type);
    142150}
    143151
  • libpolys/coeffs/numbers.h

    r50612e2 r121fd9  
    7474number  ndInit_bigint(number i, const coeffs dummy, const coeffs dst);
    7575
     76BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void * parameter);
     77
    7678/// Test whether a is a zero divisor in r
    7779/// i.e. not coprime with char. of r
  • libpolys/coeffs/shortfl.cc

    r50612e2 r121fd9  
    1212#include <string.h>
    1313#include <coeffs/coeffs.h>
     14#include <coeffs/numbers.h>
    1415#include <reporter/reporter.h>
    1516#include <coeffs/numbers.h>
     
    540541  return NULL;
    541542}
    542 
    543 
    544 
    545 
    546 
    547 /// test, whether r is an instance of nInitCoeffs(n, parameter)
    548 static BOOLEAN nrCoeffsEqual(const coeffs r, n_coeffType n, void*)
    549 {
    550   assume( getCoeffType(r) == ID );
    551 
    552   return (n == ID);
    553 }
    554 
    555543
    556544BOOLEAN nrInitChar(coeffs n, void*)
     
    587575#endif
    588576 
    589   n->nCoeffIsEqual = nrCoeffsEqual;
     577  n->nCoeffIsEqual = ndCoeffIsEqual;
    590578
    591579  // TODO: Any variables?
Note: See TracChangeset for help on using the changeset viewer.