Changeset a31f248 in git for Singular/maps.cc


Ignore:
Timestamp:
Mar 7, 2002, 7:49:16 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5ee3246883b72c3d70174075aadf91e31aa7cc1e
Parents:
c1975864ec9e675a62cefef438dc443d378d5ce4
Message:
*hannes: pSubstPoly


git-svn-id: file:///usr/local/Singular/svn/trunk@5968 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/maps.cc

    rc19758 ra31f248  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: maps.cc,v 1.38 2002-01-22 09:57:53 Singular Exp $ */
     4/* $Id: maps.cc,v 1.39 2002-03-07 18:48:13 Singular Exp $ */
    55/*
    66* ABSTRACT - the mapping of polynomials to other rings
     
    671671  return rp.next;
    672672}
     673
     674poly pSubstPoly(poly p, int var, poly image)
     675{
     676  map theMap=(map)idMaxIdeal(1);
     677  theMap->preimage=NULL;
     678  pDelete(&(theMap->m[var-1]));
     679  theMap->m[var-1]=pCopy(image);
     680 
     681  leftv v=(leftv)omAlloc0Bin(sleftv_bin);
     682  sleftv tmpW;
     683  memset(&tmpW,0,sizeof(sleftv));
     684  tmpW.rtyp=POLY_CMD;
     685  tmpW.data=p;
     686  poly res=NULL;
     687  if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,currRing,NULL,NULL,0,nCopy))
     688  {
     689    WerrorS("map failed");
     690    v->data=NULL;
     691  }
     692  res=(poly)(v->data);
     693  idDelete((ideal *)(&theMap));
     694  omFreeBin((ADDRESS)v, sleftv_bin);
     695  return res;
     696}
     697
Note: See TracChangeset for help on using the changeset viewer.