Changeset 27ffeb in git
- Timestamp:
- May 20, 2010, 6:19:08 PM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 7dc3e1ccdbb09e272b92ea5e626578cdfadb0864
- Parents:
- aff5ae9de50f937ee37e0cb1ec117c015c914e3e
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-05-20 18:19:08+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:54:57+01:00
- Location:
- coeffs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/numbers.cc
raff5ae r27ffeb 102 102 number ndExtGcd (number a, number b, number *s, number *t) { return nInit(1); } 103 103 #endif 104 105 /*2106 * init operations for characteristic c (complete==TRUE)107 * init nDelete for characteristic c (complete==FALSE)108 */109 void nSetChar(coeffs r)110 {111 /*----------------------generic ----------------*/112 if ( r->cfSetChar!=NULL) r->cfSetChar(r);113 114 // not yet ready:115 #if 0 /* vertagt*/116 /*--------------------- Q_a/ Zp_a -----------------*/117 else if (nField_is_Extension(r))118 {119 if (r->minpoly != NULL)120 {121 naSetChar(c,r);122 if (rField_is_Q_a(r)) r->nInit_bigint=naMap00;123 if (rField_is_Zp_a(r)) r->nInit_bigint=naMap0P;124 }125 else126 {127 ntSetChar(c,r);128 if (rField_is_Q_a(r)) r->nInit_bigint=ntMap00;129 if (rField_is_Zp_a(r)) r->nInit_bigint=ntMap0P;130 }131 }132 #endif133 #ifdef HAVE_RINGS134 /*----------------------ring Z / 2^m----------------*/135 else if (nField_is_Ring_2toM(r))136 {137 // nr2mSetExp(c, r);138 // r->nInit_bigint=nr2mMapQ;139 }140 /*----------------------ring Z ----------------*/141 else if (nField_is_Ring_Z(r))142 {143 // nrzSetExp(c, r);144 // r->nInit_bigint=nrzMapQ;145 }146 /*----------------------ring Z / n----------------*/147 else if (nField_is_Ring_ModN(r))148 {149 // nrnSetExp(c, r);150 // r->nInit_bigint=nrnMapQ;151 }152 /*----------------------ring Z / n----------------*/153 else if (nField_is_Ring_PtoM(r))154 {155 // nrnSetExp(c, r);156 // r->nInit_bigint=nrnMapQ;157 }158 #endif159 /* -------------- GF(p^m) -----------------------*/160 else if (nField_is_GF(r))161 {162 // nfSetChar(c,r->parameter);163 }164 /* -------------- R -----------------------*/165 //if (c==(-1))166 else if (nField_is_R(r))167 {168 // r->nInit_bigint=nrMapQ;169 }170 /* -------------- long R -----------------------*/171 /* -------------- long C -----------------------*/172 else if ((nField_is_long_R(r))173 || (nField_is_long_C(r)))174 {175 // setGMPFloatDigits(r->float_len,r->float_len2);176 // if (nField_is_long_R(r)) r->nInit_bigint=ngfMapQ;177 // else r->nInit_bigint=ngcMapQ;178 }179 #ifdef TEST180 /* -------------- R -----------------------*/181 //if (c==(-1))182 else if (!nField_is_R(r) && !nField_is_Q(r))183 {184 WerrorS("unknown field");185 }186 #endif187 }188 104 189 105 static n_coeffType nLastCoeffs=n_Z2n; … … 304 220 r->cfDelete(&(r->nNULL),r); 305 221 if (r->cfKillChar!=NULL) r->cfKillChar(r); 306 /* was:307 switch(r->type)308 {309 case n_Zp_a:310 case n_Q_a:311 {312 number n=r->minpoly;313 if (n!=NULL)314 {315 r->minpoly=NULL;316 naDelete(&n,r);317 }318 }319 break;320 default:321 break;322 }323 */324 222 omFreeSize((void *)r, sizeof(n_Procs_s)); 325 223 r=NULL; … … 331 229 r->cf=NULL; 332 230 } 333 //if (r->algring!=NULL)334 //{335 // rKill(r->algring);336 // r->algring=NULL;337 //}338 231 } 339 232 } -
coeffs/numbers.h
raff5ae r27ffeb 55 55 /* prototypes */ 56 56 void nNew(number * a); 57 #define nInit(i) n_Init(i,currRing)58 #define nWrite(A) n_Write(A,currRing)59 57 60 58 #define nTest(a) (1) … … 91 89 #define nGetChar() n_GetChar(currRing) 92 90 93 void nInitChar(coeffs r); // do one-time initialisations 94 void nKillChar(coeffs r); // undo all initialisations 95 void nSetChar(coeffs r); // initialisations after each ring chage 91 /// one-time initialisations for new coeffs 92 coeffs nInitChar(n_coeffType t, void * parameter); 93 /// undo all initialisations 94 void nKillChar(coeffs r); 95 /// initialisations after each ring change 96 inline void nSetChar(coeffs r) 97 { 98 if ((r!=NULL) && (r->cfSetChar!=NULL)) r->cfSetChar(r); 99 } 96 100 97 101 #define nDivBy0 "div by 0"
Note: See TracChangeset
for help on using the changeset viewer.