Changeset e4611fa in git for Singular/maps_ip.cc
- Timestamp:
- Apr 6, 2004, 5:14:26 PM (20 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 6a33fd790520524415959fe0fa50e769516c1130
- Parents:
- e1f17c418b7f988342fa9f2397050bd5f3fa2e35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/maps_ip.cc
re1f17c re4611fa 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: maps_ip.cc,v 1. 3 2004-04-06 09:13:35Singular Exp $ */4 /* $Id: maps_ip.cc,v 1.4 2004-04-06 15:14:26 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - the mapping of polynomials to other rings … … 300 300 ideal idSubstPoly(ideal id, int n, poly e) 301 301 { 302 int k=MATROWS((matrix)id)*MATCOLS((matrix)id); 303 ideal res=(ideal)mpNew(MATROWS((matrix)id),MATCOLS((matrix)id)); 304 305 res->rank = id->rank; 306 for(k--;k>=0;k--) 307 { 308 res->m[k]=pSubstPoly(id->m[k],n,e); 309 } 302 303 #ifdef HAVE_PLURAL 304 if (rIsPluralRing(currRing)) 305 { 306 int k=MATROWS((matrix)id)*MATCOLS((matrix)id); 307 ideal res=(ideal)mpNew(MATROWS((matrix)id),MATCOLS((matrix)id)); 308 res->rank = id->rank; 309 WarnS("not implemented: only substitution only by a monomial"); 310 for(k--;k>=0;k--) 311 { 312 res->m[k]=pSubst(pCopy(id->m[k]),n,e); 313 } 314 return res; 315 } 316 #endif 317 map theMap=(map)idMaxIdeal(1); 318 theMap->preimage=NULL; 319 pDelete(&(theMap->m[n-1])); 320 theMap->m[n-1]=pCopy(e); 321 322 leftv v=(leftv)omAlloc0Bin(sleftv_bin); 323 sleftv tmpW; 324 memset(&tmpW,0,sizeof(sleftv)); 325 tmpW.rtyp=IDEAL_CMD; 326 tmpW.data=id; 327 if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,currRing,NULL,NULL,0,nCopy)) 328 { 329 WerrorS("map failed"); 330 v->data=NULL; 331 } 332 ideal res=(ideal)(v->data); 333 idDelete((ideal *)(&theMap)); 334 omFreeBin((ADDRESS)v, sleftv_bin); 310 335 return res; 311 336 }
Note: See TracChangeset
for help on using the changeset viewer.