Changeset 54fc4e in git for libpolys/coeffs/rintegers.cc
- Timestamp:
- Oct 26, 2013, 5:03:16 PM (11 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ea3c090b559b31abca294f2172ec7d3304bd4ab7
- Parents:
- 2a2ba4fcd246395ea2e5d241d8945e66d030c103
- git-author:
- Yue Ren <ren@mathematik.uni-kl.de>2013-10-26 17:03:16+02:00
- git-committer:
- Yue Ren <ren@mathematik.uni-kl.de>2014-07-22 12:24:18+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/rintegers.cc
r2a2ba4 r54fc4e 23 23 #include <coeffs/rmodulon.h> 24 24 #include "si_gmp.h" 25 26 #ifdef HAVE_FACTORY 27 #include <factory/factory.h> 28 #endif 25 29 26 30 /// Our Type! … … 368 372 return s; 369 373 } 374 375 376 #ifdef HAVE_FACTORY 377 CanonicalForm nrzConvSingNFactoryN(number n, BOOLEAN setChar, const coeffs /*r*/) 378 { 379 if (setChar) setCharacteristic( 0 ); 380 381 CanonicalForm term; 382 mpz_t num; 383 mpz_init_set(num, *((mpz_t*)n)); 384 term = make_cf(num); 385 return term; 386 } 387 388 number nrzConvFactoryNSingN(const CanonicalForm n, const coeffs r) 389 { 390 if (n.isImm()) 391 return nrzInit(n.intval(),r); 392 else 393 { 394 int_number m = (int_number) omAllocBin(gmp_nrz_bin); 395 gmp_numerator(n,m); 396 return (number) m; 397 } 398 } 399 #endif // HAVE_FACTORY 370 400 371 401 const char * nrzRead (const char *s, number *a, const coeffs) … … 447 477 r->cfSetMap = nrzSetMap; 448 478 r->cfCoeffWrite = nrzCoeffWrite; 449 r->cfQuot1 = nrzQuot1; 479 r->cfQuot1 = nrzQuot1; 480 #ifdef HAVE_FACTORY 481 r->convSingNFactoryN=nrzConvSingNFactoryN; 482 r->convFactoryNSingN=nrzConvFactoryNSingN; 483 #endif 450 484 // debug stuff 451 485
Note: See TracChangeset
for help on using the changeset viewer.