Changeset f769fd0 in git for Singular/maps_ip.cc
- Timestamp:
- Feb 20, 2013, 5:48:56 PM (11 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ef7324f0fe134054c1000413c4d1fa21ccc163b1
- Parents:
- 5602268070a5515f6c8a239a56a190a45699fcfd
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-02-20 17:48:56+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-02-20 19:04:08+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/maps_ip.cc
r5602268 rf769fd0 234 234 poly pSubstPar(poly p, int par, poly image) 235 235 { 236 assume( nCoeff_is_transExt(currRing->cf) ); // nCoeff_is_Extension??? 237 const ring R = currRing->cf->extRing; 238 236 239 ideal theMapI = idInit(rPar(currRing),1); 237 nMapFunc nMap = n_SetMap( currRing->cf->extRing->cf, currRing->cf);240 nMapFunc nMap = n_SetMap(R->cf, currRing->cf); 238 241 239 242 int i; … … 245 248 theMapI->m[i-1] = p_Copy(image, currRing); 246 249 } 247 250 248 251 249 252 map theMap=(map)theMapI; … … 259 262 260 263 number d = n_GetDenom(p_GetCoeff(p, currRing), currRing); 261 if (!n_IsOne (d, currRing->cf)) 264 assume( p_Test((poly)NUM(d), R) ); 265 266 if ( n_IsOne (d, currRing->cf) ) 267 { 268 n_Delete(&d, currRing); d = NULL; 269 } 270 else if (!p_IsConstant((poly)NUM(d), R)) 271 { 262 272 WarnS("ignoring denominators of coefficients..."); 263 n_Delete(&d, currRing); 264 265 number num = n_GetNumerator(p_GetCoeff(p, currRing), currRing); 273 n_Delete(&d, currRing); d = NULL; 274 } 275 276 number num = n_GetNumerator(p_GetCoeff(p, currRing), currRing); 277 assume( p_Test((poly)NUM(num), R) ); 266 278 267 279 memset(&tmpW,0,sizeof(sleftv)); 268 280 tmpW.rtyp = POLY_CMD; 269 281 tmpW.data = NUM (num); // a copy of this poly will be used 270 271 if (maApplyFetch(MAP_CMD,theMap,v,&tmpW, currRing->cf->extRing,NULL,NULL,0,nMap))282 283 if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,R,NULL,NULL,0,nMap)) 272 284 { 273 285 WerrorS("map failed"); … … 279 291 poly pp = pHead(p); 280 292 //PrintS("map:");pWrite(pp); 281 pSetCoeff(pp, nInit(1)); 293 if( d != NULL ) 294 { 295 pSetCoeff(pp, n_Invers(d, currRing->cf)); 296 n_Delete(&d, currRing); // d = NULL; 297 } else 298 pSetCoeff(pp, nInit(1)); 299 282 300 //PrintS("->");pWrite((poly)(v->data)); 283 301 poly ppp = pMult((poly)(v->data),pp);
Note: See TracChangeset
for help on using the changeset viewer.