- Timestamp:
- Mar 3, 2021, 8:15:44 PM (3 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- ed88662fc73fa44031d15c9da35b0018e4b6e78e
- Parents:
- 8bf51f59b9dcce7af6334bc9dc6ad15a2a523002
- Location:
- libpolys/coeffs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/ffields.cc
r8bf51f r9af51a9 721 721 } 722 722 723 static number nfMapMPZ(number c, const coeffs src, const coeffs dst)723 static number nfMapMPZ(number c, const coeffs, const coeffs dst) 724 724 { 725 725 mpz_t tmp; -
libpolys/coeffs/flintcf_Q.cc
r8bf51f r9af51a9 44 44 } 45 45 46 static BOOLEAN CoeffIsEqual(const coeffs r, n_coeffType n, void * parameter)46 static BOOLEAN CoeffIsEqual(const coeffs r, n_coeffType n, void *) 47 47 { 48 48 return (r->type==n); 49 49 } 50 static void SetChar(const coeffs r)50 static void SetChar(const coeffs) 51 51 { 52 52 // dummy 53 53 } 54 static number Mult(number a, number b, const coeffs c)54 static number Mult(number a, number b, const coeffs) 55 55 { 56 56 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 59 59 return (number)res; 60 60 } 61 static number Sub(number a, number b, const coeffs c)61 static number Sub(number a, number b, const coeffs) 62 62 { 63 63 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 66 66 return (number)res; 67 67 } 68 static number Add(number a, number b, const coeffs c)68 static number Add(number a, number b, const coeffs) 69 69 { 70 70 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 73 73 return (number)res; 74 74 } 75 static number Div(number a, number b, const coeffs c)75 static number Div(number a, number b, const coeffs) 76 76 { 77 77 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 95 95 return (number)res; 96 96 } 97 static number ExactDiv(number a, number b, const coeffs c)97 static number ExactDiv(number a, number b, const coeffs) 98 98 { 99 99 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 107 107 return (number)res; 108 108 } 109 static number IntMod(number a, number b, const coeffs c) 109 #if 0 110 static number IntMod(number a, number b, const coeffs) 110 111 { 111 112 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 114 115 return (number)res; 115 116 } 116 static number Init (long i, const coeffs r) 117 #endif 118 static number Init (long i, const coeffs) 117 119 { 118 120 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 121 123 return (number)res; 122 124 } 123 static number InitMPZ (mpz_t i, const coeffs r)125 static number InitMPZ (mpz_t i, const coeffs) 124 126 { 125 127 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 128 130 return (number)res; 129 131 } 130 static int Size (number n, const coeffs r)132 static int Size (number n, const coeffs) 131 133 { 132 134 return fmpq_poly_degree((fmpq_poly_ptr)n); 133 135 } 134 static long Int (number &n, const coeffs r)136 static long Int (number &n, const coeffs) 135 137 { 136 138 if (fmpq_poly_degree((fmpq_poly_ptr)n)==0) … … 155 157 return 0; 156 158 } 157 static void MPZ(mpz_t result, number &n, const coeffs r)159 static void MPZ(mpz_t result, number &n, const coeffs) 158 160 { 159 161 mpz_init(result); … … 173 175 } 174 176 } 175 static number Neg(number a, const coeffs r)177 static number Neg(number a, const coeffs) 176 178 { 177 179 fmpq_poly_neg((fmpq_poly_ptr)a,(fmpq_poly_ptr)a); 178 180 return a; 179 181 } 180 static number Invers(number a, const coeffs r)182 static number Invers(number a, const coeffs) 181 183 { 182 184 if(fmpq_poly_is_zero((fmpq_poly_ptr)a)) … … 198 200 } 199 201 } 200 static number Copy(number a, const coeffs r)202 static number Copy(number a, const coeffs) 201 203 { 202 204 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 205 207 return (number)res; 206 208 } 207 //static number RePart(number a, const coeffs r)209 //static number RePart(number a, const coeffs) 208 210 //{ 209 211 //} 210 //static number ImPart(number a, const coeffs r)212 //static number ImPart(number a, const coeffs) 211 213 //{ 212 214 //} 213 static BOOLEAN IsOne (number a, const coeffs r);214 static BOOLEAN IsZero (number a, const coeffs r);215 //static void WriteLong(number &a, const coeffs r)215 static BOOLEAN IsOne (number a, const coeffs); 216 static BOOLEAN IsZero (number a, const coeffs); 217 //static void WriteLong(number &a, const coeffs) 216 218 //{ 217 219 //} … … 312 314 return s; 313 315 } 314 static void Normalize(number &a, const coeffs r)316 static void Normalize(number &a, const coeffs) 315 317 { 316 318 fmpq_poly_canonicalise((fmpq_poly_ptr)a); 317 319 } 318 static BOOLEAN Greater (number a, number b, const coeffs r)320 static BOOLEAN Greater (number a, number b, const coeffs) 319 321 { 320 322 return (fmpq_poly_cmp((fmpq_poly_ptr)a,(fmpq_poly_ptr)b)>0); 321 323 } 322 static BOOLEAN Equal (number a, number b, const coeffs r)324 static BOOLEAN Equal (number a, number b, const coeffs) 323 325 { 324 326 return (fmpq_poly_equal((fmpq_poly_ptr)a,(fmpq_poly_ptr)b)); 325 327 } 326 static BOOLEAN IsZero (number a, const coeffs r)328 static BOOLEAN IsZero (number a, const coeffs) 327 329 { 328 330 return fmpq_poly_is_zero((fmpq_poly_ptr)a); 329 331 } 330 static BOOLEAN IsOne (number a, const coeffs r)332 static BOOLEAN IsOne (number a, const coeffs) 331 333 { 332 334 return fmpq_poly_is_one((fmpq_poly_ptr)a); 333 335 } 334 static BOOLEAN IsMOne (number k, const coeffs r)336 static BOOLEAN IsMOne (number k, const coeffs) 335 337 { 336 338 if (fmpq_poly_length((fmpq_poly_ptr)k)>0) return FALSE; … … 356 358 return (result); 357 359 } 358 static BOOLEAN GreaterZero (number k, const coeffs r)360 static BOOLEAN GreaterZero (number, const coeffs) 359 361 { 360 362 // does it have a leading sign? … … 362 364 return TRUE; 363 365 } 364 static void Power(number a, int i, number * result, const coeffs r)366 static void Power(number a, int i, number * result, const coeffs) 365 367 { 366 368 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 369 371 fmpq_poly_pow((fmpq_poly_ptr)(*result),(fmpq_poly_ptr)a,i); 370 372 } 371 static number GetDenom(number &n, const coeffs r)373 static number GetDenom(number &n, const coeffs) 372 374 { 373 375 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); 374 376 fmpq_poly_init(res); 375 fmpz_ptr den=fmpq_poly_denref( res);377 fmpz_ptr den=fmpq_poly_denref((fmpq_poly_ptr)n); 376 378 fmpq_poly_set_fmpz(res,den); 377 379 return (number)res; 378 380 } 379 static number GetNumerator(number &n, const coeffs r)381 static number GetNumerator(number &n, const coeffs) 380 382 { 381 383 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 386 388 return (number)res; 387 389 } 388 static number Gcd(number a, number b, const coeffs r)390 static number Gcd(number a, number b, const coeffs) 389 391 { 390 392 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 393 395 return (number)res; 394 396 } 395 static number ExtGcd(number a, number b, number *s, number *t,const coeffs r)397 static number ExtGcd(number a, number b, number *s, number *t,const coeffs) 396 398 { 397 399 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 402 404 return (number)res; 403 405 } 404 static number Lcm(number a, number b, const coeffs r)406 static number Lcm(number, number, const coeffs) 405 407 { 406 408 WerrorS("not yet: Lcm"); 407 } 408 static void Delete(number * a, const coeffs r) 409 return NULL; 410 } 411 static void Delete(number * a, const coeffs) 409 412 { 410 413 if ((*a)!=NULL) … … 415 418 } 416 419 } 417 static nMapFunc SetMap(const coeffs src, const coeffs dst)420 static nMapFunc SetMap(const coeffs, const coeffs) 418 421 { 419 422 WerrorS("not yet: SetMap"); 420 423 return NULL; 421 424 } 422 //static void InpMult(number &a, number b, const coeffs r)425 //static void InpMult(number &a, number b, const coeffs) 423 426 //{ 424 427 //} 425 //static void InpAdd(number &a, number b, const coeffs r)428 //static void InpAdd(number &a, number b, const coeffs) 426 429 //{ 427 430 //} 428 static number Init_bigint(number i, const coeffs dummy, const coeffs dst) 431 #if 0 432 static number Init_bigint(number i, const coeffs, const coeffs) 429 433 { 430 434 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 438 442 return (number)res; 439 443 } 440 static number Farey(number p, number n, const coeffs) 444 #endif 445 static number Farey(number, number, const coeffs) 441 446 { 442 447 WerrorS("not yet: Farey"); 443 } 444 static number ChineseRemainder(number *x, number *q,int rl, BOOLEAN sym,CFArray &inv_cache,const coeffs) 448 return NULL; 449 } 450 static number ChineseRemainder(number *, number *,int , BOOLEAN ,CFArray &,const coeffs) 445 451 { 446 452 WerrorS("not yet: ChineseRemainder"); 447 } 448 static int ParDeg(number x,const coeffs r) 453 return NULL; 454 } 455 static int ParDeg(number x,const coeffs) 449 456 { 450 457 return fmpq_poly_degree((fmpq_poly_ptr)x); 451 458 } 452 static number Parameter(const int i, const coeffs r)459 static number Parameter(const int, const coeffs) 453 460 { 454 461 fmpq_poly_ptr res=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t)); … … 507 514 // cfClearContent 508 515 // cfClearDenominators 509 static number ConvFactoryNSingN( const CanonicalForm n, const coeffs r)516 static number ConvFactoryNSingN( const CanonicalForm, const coeffs) 510 517 { 511 518 WerrorS("not yet: ConvFactoryNSingN"); 512 } 513 static CanonicalForm ConvSingNFactoryN( number n, BOOLEAN setChar, const coeffs r ) 519 return NULL; 520 } 521 static CanonicalForm ConvSingNFactoryN( number, BOOLEAN, const coeffs ) 514 522 { 515 523 WerrorS("not yet: ConvSingNFactoryN"); 524 return CanonicalForm(0); 516 525 } 517 526 char * CoeffName(const coeffs r) … … 540 549 } 541 550 #ifdef LDEBUG 542 static BOOLEAN DBTest(number a, const char *f, const int l, const coeffs r)551 static BOOLEAN DBTest(number, const char *, const int, const coeffs) 543 552 { 544 553 return TRUE; -
libpolys/coeffs/modulop.cc
r8bf51f r9af51a9 327 327 328 328 #ifndef HAVE_GENERIC_MULT 329 static number npPar(int i, coeffs r)329 static number npPar(int, coeffs r) 330 330 { 331 331 return (number)(long)r->npExpTable[1]; … … 607 607 } 608 608 609 nMapFunc npSetMap(const coeffs src, const coeffs dst)609 nMapFunc npSetMap(const coeffs src, const coeffs) 610 610 { 611 611 #ifdef HAVE_RINGS -
libpolys/coeffs/ntupel.cc
r8bf51f r9af51a9 519 519 } 520 520 521 nMapFunc nnSetMap(const coeffs src, const coeffs dst)521 nMapFunc nnSetMap(const coeffs, const coeffs) 522 522 { 523 523 return nnMap; … … 579 579 580 580 581 static number nnChineseRemainder(number * x, number *q,int rl, BOOLEAN sym, CFArray &inv_cache,const coeffs CF)581 static number nnChineseRemainder(number *, number *,int , BOOLEAN , CFArray &,const coeffs ) 582 582 { 583 583 WerrorS("not yet");
Note: See TracChangeset
for help on using the changeset viewer.