Changeset fc4977 in git
- Timestamp:
- Nov 8, 2011, 1:46:01 PM (12 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- 146c6031e29bacb7405aa0a52f67591c3cfd1d1f
- Parents:
- c3238c9cf73749e83476377e7c488cf63eca07fd
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-11-08 13:46:01+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:14:11+01:00
- Location:
- libpolys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
rc3238c9 rfc4977 203 203 int char_flag; 204 204 int ref; 205 /// how many variables of factort are already used by this coeff 206 int factoryVarOffset; 205 207 n_coeffType type; 206 208 //------------------------------------------- -
libpolys/polys/clapconv.cc
rc3238c9 rfc4977 64 64 poly term = p_Init(r); 65 65 pNext( term ) = NULL; 66 int varoffset=r->cf->factoryVarOffset; 66 67 for ( int i = 1; i <= r->N; i++ ) 67 p_SetExp( term, i , exp[i], r);68 p_SetExp( term, i-varoffset, exp[i], r); 68 69 pGetCoeff( term )=r->cf->convFactoryNSingN(f, r->cf); 69 70 p_Setm( term, r ); … … 92 93 if (errorreported) break; 93 94 setChar=FALSE; 95 int varoffset=r->cf->factoryVarOffset; 94 96 for ( int i = n; i >0; i-- ) 95 97 { 96 98 if ( (e = p_GetExp( p, i, r)) != 0 ) 97 term *= power( Variable( i ), e );99 term *= power( Variable( i+varoffset ), e ); 98 100 } 99 101 result += term; -
libpolys/polys/ext_fields/transext.cc
rc3238c9 rfc4977 51 51 #ifdef HAVE_FACTORY 52 52 #include <polys/clapsing.h> 53 #include <polys/clapconv.h> 54 #include <factory/factory.h> 53 55 #endif 54 56 … … 90 92 91 93 92 externomBin fractionObjectBin = omGetSpecBin(sizeof(fractionObject));94 omBin fractionObjectBin = omGetSpecBin(sizeof(fractionObject)); 93 95 94 96 /// forward declarations … … 305 307 fraction result = (fraction)omAlloc0Bin(fractionObjectBin); 306 308 NUM(result) = p_ISet(i, ntRing); 307 DEN(result) = NULL;308 COM(result) = 0;309 //DEN(result) = NULL; // done by omAlloc0Bin 310 //COM(result) = 0; // done by omAlloc0Bin 309 311 return (number)result; 310 312 } … … 1199 1201 rDelete(cf->extRing); 1200 1202 } 1203 #ifdef HAVE_FACTORY 1204 number ntConvFactoryNSingN( const CanonicalForm n, const coeffs cf) 1205 { 1206 if (n.isZero()) return NULL; 1207 poly p=convFactoryPSingP(n,ntRing); 1208 fraction result = (fraction)omAlloc0Bin(fractionObjectBin); 1209 NUM(result) = p; 1210 //DEN(result) = NULL; // done by omAlloc0Bin 1211 //COM(result) = 0; // done by omAlloc0Bin 1212 return (number)result; 1213 } 1214 CanonicalForm ntConvSingNFactoryN( number n, BOOLEAN setChar, const coeffs cf ) 1215 { 1216 ntTest(n); 1217 if (IS0(n)) return CanonicalForm(0); 1218 1219 fraction f = (fraction)n; 1220 return convSingPFactoryP(NUM(f),ntRing); 1221 } 1222 #endif 1201 1223 1202 1224 BOOLEAN ntInitChar(coeffs cf, void * infoStruct) … … 1216 1238 cf->extRing = e->r; 1217 1239 cf->extRing->ref ++; // increase the ref.counter for the ground poly. ring! 1240 cf->factoryVarOffset = cf->extRing->cf->factoryVarOffset+rVar(cf->extRing); 1218 1241 1219 1242 /* propagate characteristic up so that it becomes … … 1261 1284 PrintS("// Hence gcd's cannot be cancelled in any\n"); 1262 1285 PrintS("// computed fraction!\n"); 1286 #else 1287 cf->convFactoryNSingN =ntConvFactoryNSingN; 1288 cf->convSingNFactoryN =ntConvSingNFactoryN; 1263 1289 #endif 1264 1290
Note: See TracChangeset
for help on using the changeset viewer.