Changeset 696bde in git


Ignore:
Timestamp:
Mar 28, 2012, 4:55:33 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
33635d3a6cdc2409df74061d54e08a61ec61082273314427e2f6ac4d8a81ae22a99e7ab380104210
Parents:
e197f51703da5cda44324097bd41e1c9b43a7f80
git-author:
Martin Lee <martinlee84@web.de>2012-03-28 16:55:33+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-03-28 18:13:38+02:00
Message:
fix: pSubstPar
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/maps_ip.cc

    re197f5 r696bde  
    66* ABSTRACT - the mapping of polynomials to other rings
    77*/
     8#define TRANSEXT_PRIVATES
    89
    910#include "config.h"
     
    1819#include <polys/matpol.h>
    1920#include <polys/prCopy.h>
     21#include <polys/ext_fields/transext.h>
    2022
    2123//#include <libpolys/polys/ext_fields/longtrans.h>
     
    234236{
    235237  ideal theMapI = idInit(rPar(currRing),1);
    236   nMapFunc nMap = n_SetMap(currRing->cf->extRing->cf, currRing->cf->extRing->cf);
     238  nMapFunc nMap = n_SetMap(currRing->cf->extRing->cf, currRing->cf);
    237239
    238240  int i;
     
    255257  while (p!=NULL)
    256258  {
     259    memset(v,0,sizeof(sleftv));
     260
     261    number d = n_GetDenom(p_GetCoeff(p, currRing), currRing);
     262    if (!n_IsOne (d, currRing->cf)) WarnS("ignoring denominators of coefficients...");
     263    n_Delete(&d, currRing);
     264
     265    number num = n_GetNumerator(p_GetCoeff(p, currRing), currRing);
     266
    257267    memset(&tmpW,0,sizeof(sleftv));
    258     memset(v,0,sizeof(sleftv));
    259     tmpW.rtyp=POLY_CMD;
    260    
    261     number n = pGetCoeff(p);
    262     tmpW.data = n_GetNumerator(n, currRing);
    263    
    264     if(1)
    265     {
    266       number d = n_GetDenom(n, currRing);
    267       if ( d != NULL ) WarnS("ignoring denominators of coefficients...");
    268       n_Delete(&d, currRing);
    269     }
     268    tmpW.rtyp = POLY_CMD;
     269    tmpW.data = NUM (num); // a copy of this poly will be used
    270270     
    271271    if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,currRing->cf->extRing,NULL,NULL,0,nMap))
     
    274274      v->data=NULL;
    275275    }
     276    n_Delete(&num, currRing);
     277
     278    //TODO check for memory leaks
    276279    poly pp = pHead(p);
    277280    //PrintS("map:");pWrite(pp);
Note: See TracChangeset for help on using the changeset viewer.