Changeset 85d8bee in git
 Timestamp:
 Jun 18, 2010, 5:57:47 PM (14 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
 Children:
 e5ffec70440370de33da3fa2773669fe8e35d684
 Parents:
 8e124676cbdd85ab8774665bf2a182e8c34b5450
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20100618 17:57:47+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 11:55:14+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

coeffs/rintegers.cc
r8e12467 r85d8bee 8 8 9 9 #include <string.h> 10 #include <kernel/mod2.h> 11 #include <omalloc/mylimits.h> 12 #include <kernel/structs.h> 13 #include <kernel/febase.h> 14 #include <omalloc/omalloc.h> 15 #include <kernel/numbers.h> 16 #include <kernel/longrat.h> 17 #include <kernel/mpr_complex.h> 18 #include <kernel/ring.h> 19 #include <kernel/rintegers.h> 20 #include <kernel/si_gmp.h> 10 #include <auxiliary.h> 11 #include <mylimits.h> 12 #include "coeffs.h" 13 #include <reporter.h> 14 #include <omalloc.h> 15 #include "numbers.h" 16 #include "longrat.h" 17 #include "mpr_complex.h" 18 #include "rintegers.h" 19 #include <si_gmp.h> 21 20 22 21 #ifdef HAVE_RINGS … … 38 37 * Give the smallest non unit k, such that a * x = k = b * y has a solution 39 38 */ 40 number nrzLcm (number a,number b, ringr)39 number nrzLcm (number a,number b,const coeffs r) 41 40 { 42 41 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 50 49 * a solution. 51 50 */ 52 number nrzGcd (number a,number b, ringr)51 number nrzGcd (number a,number b,const coeffs r) 53 52 { 54 53 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 87 86 * create a number from int 88 87 */ 89 number nrzInit (int i, const ringr)88 number nrzInit (int i, const coeffs r) 90 89 { 91 90 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 94 93 } 95 94 96 void nrzDelete(number *a, const ringr)95 void nrzDelete(number *a, const coeffs r) 97 96 { 98 97 if (*a == NULL) return; … … 102 101 } 103 102 104 number nrzCopy(number a )103 number nrzCopy(number a, const coeffs r) 105 104 { 106 105 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 109 108 } 110 109 111 number cfrzCopy(number a, const ring r)112 { 113 return nrzCopy(a );110 number nrzCopyMap(number a, const coeffs src, const coeffs dst) 111 { 112 return nrzCopy(a,dst); 114 113 } 115 114 … … 123 122 * convert a number to int 124 123 */ 125 int nrzInt(number &n, const ringr)124 int nrzInt(number &n, const coeffs r) 126 125 { 127 126 return (int) mpz_get_si( (int_number)n); … … 144 143 } 145 144 146 number nrzGetUnit (number a )147 { 148 return nrzInit(1, currRing);145 number nrzGetUnit (number a, const coeffs r) 146 { 147 return nrzInit(1, r); 149 148 } 150 149 … … 253 252 } 254 253 255 number nrzMapMachineInt(number from )254 number nrzMapMachineInt(number from, const coeffs src, const coeffs dst) 256 255 { 257 256 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 260 259 } 261 260 262 number nrzMapZp(number from )261 number nrzMapZp(number from, const coeffs src, const coeffs dst) 263 262 { 264 263 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 267 266 } 268 267 269 number nrzMapQ(number from )268 number nrzMapQ(number from, const coeffs src, const coeffs dst) 270 269 { 271 270 int_number erg = (int_number) omAllocBin(gmp_nrz_bin); … … 275 274 } 276 275 277 nMapFunc nrzSetMap(const ring src, const ringdst)276 nMapFunc nrzSetMap(const coeffs src, const coeffs dst) 278 277 { 279 278 /* dst = currRing */ 280 if ( rField_is_Ring_Z(src)  rField_is_Ring_ModN(src)  rField_is_Ring_PtoM(src))281 { 282 return nrzCopy ;283 } 284 if ( rField_is_Ring_2toM(src))279 if (nField_is_Ring_Z(src)  nField_is_Ring_ModN(src)  nField_is_Ring_PtoM(src)) 280 { 281 return nrzCopyMap; 282 } 283 if (nField_is_Ring_2toM(src)) 285 284 { 286 285 return nrzMapMachineInt; 287 286 } 288 if ( rField_is_Zp(src))287 if (nField_is_Zp(src)) 289 288 { 290 289 return nrzMapZp; 291 290 } 292 if ( rField_is_Q(src))291 if (nField_is_Q(src)) 293 292 { 294 293 return nrzMapQ; … … 302 301 */ 303 302 304 void nrzSetExp(int m, ringr)305 { 306 } 307 308 void nrzInitExp(int m, ringr)303 void nrzSetExp(int m, coeffs r) 304 { 305 } 306 307 void nrzInitExp(int m, coeffs r) 309 308 { 310 309 } … … 317 316 #endif 318 317 319 void nrzWrite (number &a, const ringr)318 void nrzWrite (number &a, const coeffs r) 320 319 { 321 320 char *s,*z;
Note: See TracChangeset
for help on using the changeset viewer.