Changeset 32cc7e in git
- Timestamp:
- Sep 28, 2011, 5:47:12 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 85fd9012469ea8abe27f4869c1fdec9987b77063
- Parents:
- aa98be749867c7cb115d6a8245308363068b1c0d
- git-author:
- Burcin Erocal <burcin@erocal.org>2011-09-28 17:47:12+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:41+01:00
- Location:
- libpolys/coeffs
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
raa98be r32cc7e 72 72 } GFInfo; 73 73 74 typedef struct 75 { 76 short float_len; /**< additional char-flags, rInit */ 77 short float_len2; /**< additional char-flags, rInit */ 78 const char* par_name; /**< parameter name */ 79 } LongComplexInfo; 74 80 75 81 struct n_Procs_s … … 290 296 { 291 297 assume(r!=NULL); // r==NULL is an error 292 if (r->cfSetChar!=NULL) r->cfSetChar(r); 298 assume(r->cfSetChar != NULL); 299 r->cfSetChar(r); 293 300 } 294 301 -
libpolys/coeffs/ffields.cc
raa98be r32cc7e 762 762 //r->cfInitChar=npInitChar; 763 763 //r->cfKillChar=nfKillChar; 764 r->cfSetChar= NULL;765 764 r->nCoeffIsEqual=nfCoeffIsEqual; 766 765 -
libpolys/coeffs/gnumpc.cc
raa98be r32cc7e 375 375 } 376 376 377 BOOLEAN ngcInitChar(coeffs n, void* p) 377 BOOLEAN ngcCoeffIsEqual (const coeffs r, n_coeffType n, void * parameter) 378 { 379 if (n==ID) { 380 LongComplexInfo* p = (LongComplexInfo *)(parameter); 381 if (p->float_len == r->float_len && p->float_len2 == r->float_len2 && 382 strcmp(p->par_name, r->complex_parameter)) 383 return TRUE; 384 } 385 return FALSE; 386 } 387 388 BOOLEAN ngcInitChar(coeffs n, void* parameter) 378 389 { 379 390 assume( getCoeffType(n) == ID ); 391 assume( parameter != NULL); 392 380 393 n->cfKillChar = ndKillChar; /* dummy */ 381 394 n->ch = 0; … … 411 424 #endif 412 425 413 n->nCoeffIsEqual = ndCoeffIsEqual; 414 426 n->nCoeffIsEqual = ngcCoeffIsEqual; 427 428 n->cfSetChar=ngcSetChar; 415 429 416 430 … … 418 432 //r->cfInitChar=nlInitChar; 419 433 r->cfKillChar=NULL; 420 r->cfSetChar=NULL;421 r->nCoeffIsEqual=nlCoeffsEqual;422 434 423 435 r->cfMult = nlMult; … … 477 489 */ 478 490 479 /// TODO: Any variables? 480 if( p == NULL ) 481 n->complex_parameter = omStrDup((char*)"i"); 482 else 483 n->complex_parameter = omStrDup( (char*) p ); 491 LongComplexInfo* p = (LongComplexInfo*)parameter; 492 n->complex_parameter = omStrDup(p->par_name); 493 n->float_len = p->float_len; 494 n->float_len2 = p->float_len2; 484 495 485 496 return FALSE; 486 497 } 487 498 488 499 void ngcSetChar(const coeffs r) 500 { 501 setGMPFloatDigits(r->float_len, r->float_len2); 502 } 489 503 490 504 -
libpolys/coeffs/gnumpc.h
raa98be r32cc7e 16 16 BOOLEAN ngcInitChar(coeffs r, void*); 17 17 18 void ngcSetChar(const coeffs r); 18 19 19 20 // Private interface should be hidden!!! -
libpolys/coeffs/gnumpfl.cc
raa98be r32cc7e 304 304 /*2 305 305 * extracts the number a from s, returns the rest 306 * 307 * This is also called to print components of complex coefficients. 308 * Handle with care! 306 309 */ 307 310 const char * ngfRead (const char * start, number * a, const coeffs r) 308 311 { 309 assume( getCoeffType(r) == ID );312 assume( getCoeffType(r) == ID or getCoeffType(r) == n_long_C); 310 313 311 314 char *s= (char *)start; … … 383 386 } 384 387 385 BOOLEAN ngfInitChar(coeffs n, void *) 388 BOOLEAN ngfCoeffIsEqual (const coeffs r, n_coeffType n, void * parameter) 389 { 390 if (n==ID) { 391 LongComplexInfo* p = (LongComplexInfo *)(parameter); 392 if (p->float_len == r->float_len && p->float_len2 == r->float_len2) 393 return TRUE; 394 } 395 return FALSE; 396 } 397 398 void ngfSetChar(const coeffs r) 399 { 400 setGMPFloatDigits(r->float_len, r->float_len2); 401 } 402 403 BOOLEAN ngfInitChar(coeffs n, void *parameter) 386 404 { 387 405 assume( getCoeffType(n) == ID ); 406 assume( parameter != NULL); 407 LongComplexInfo *p = (LongComplexInfo*)parameter; 408 388 409 n->cfKillChar = ndKillChar; /* dummy */ 410 411 n->cfSetChar = ngfSetChar; 389 412 n->ch = 0; 390 413 … … 416 439 #endif 417 440 418 n->nCoeffIsEqual = ndCoeffIsEqual; 441 n->nCoeffIsEqual = ngfCoeffIsEqual; 442 443 n->float_len = p->float_len; 444 n->float_len2 = p->float_len2; 445 419 446 return FALSE; 420 447 } -
libpolys/coeffs/gnumpfl.h
raa98be r32cc7e 42 42 void ngfDelete(number *a, const coeffs r); 43 43 44 void setGMPFloatDigits( size_t digits, size_t rest );45 44 number ngfMapQ(number from, const coeffs r); 46 45 -
libpolys/coeffs/longrat.cc
raa98be r32cc7e 2602 2602 2603 2603 r->cfKillChar=NULL; 2604 r->cfSetChar=NULL;2605 2604 r->nCoeffIsEqual=ndCoeffIsEqual; 2606 2605 r->cfKillChar = ndKillChar; /* dummy */ -
libpolys/coeffs/numbers.cc
raa98be r32cc7e 116 116 } 117 117 void ndKillChar(coeffs) {} 118 void ndSetChar(const coeffs) {} 118 119 119 120 number nd_Copy(number a, const coeffs r) { return n_Copy(a, r); } … … 235 236 236 237 //n->cfKillChar = ndKillChar; /* dummy */ 238 n->cfSetChar = ndSetChar; /* dummy */ 237 239 // temp. removed to catch all the coeffs which miss to implement this! 238 240 … … 276 278 assume(n->nCoeffIsEqual!=NULL); 277 279 if(n->cfKillChar==NULL) Warn("cfKillChar is NULL for coeff %d",t); 278 if(n->cfSetChar!=NULL) Warn("cfSetChar is NOT NULL for coeff %d",t);280 assume(n->cfSetChar!=NULL); 279 281 assume(n->cfMult!=NULL); 280 282 assume(n->cfSub!=NULL); -
libpolys/coeffs/rintegers.cc
raa98be r32cc7e 386 386 { 387 387 assume( getCoeffType(r) == ID ); 388 r->cfSetChar= NULL;389 388 r->nCoeffIsEqual = ndCoeffIsEqual; 390 389 r->cfKillChar = ndKillChar;
Note: See TracChangeset
for help on using the changeset viewer.