Changeset 628f663 in git


Ignore:
Timestamp:
Feb 19, 2013, 6:27:58 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
Children:
87343b4d7f38df9831596b5fcc7ded4fcff5f407
Parents:
644b311072b1277f612b8e3d8ad80e23a56d5ec0
git-author:
Martin Lee <martinlee84@web.de>2013-02-19 18:27:58+01:00
git-committer:
Martin Lee <martinlee84@web.de>2013-02-20 22:34:19+01:00
Message:
chg: towards correct imap
Location:
libpolys/polys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    r644b31 r628f663  
    921921#endif
    922922
    923 number naCopyExt(number a, const coeffs src, const coeffs)
     923number naCopyExt(number a, const coeffs src, const coeffs dst)
    924924{
    925925  fraction fa=(fraction)a;
    926   return (number)p_Copy(NUM(fa),src->extRing);
     926  poly p = p_Copy(NUM(fa),src->extRing);
     927  assume( rSamePolyRep(src->extRing, dst->extRing) );
     928  definiteReduce(p, dst->extRing->qideal->m[0], dst);
     929  return (number)p;
    927930}
    928931
     
    995998  if (nCoeff_is_Q(bSrc) && nCoeff_is_Q(bDst))
    996999  {
    997     if (strcmp(rRingVar(0, src->extRing),
    998                rRingVar(0, dst->extRing)) == 0)
     1000    if (rSamePolyRep(src->extRing, dst->extRing) && (strcmp(rRingVar(0, src->extRing), rRingVar(0, dst->extRing)) == 0))
    9991001    {
    10001002      if (src->type==n_algExt)
     
    10091011  if (nCoeff_is_Zp(bSrc) && nCoeff_is_Zp(bDst))
    10101012  {
    1011     if (strcmp(rRingVar(0,src->extRing),rRingVar(0,dst->extRing))==0)
     1013    if (rSamePolyRep(src->extRing, dst->extRing) && (strcmp(rRingVar(0,src->extRing),rRingVar(0,dst->extRing))==0))
    10121014    {
    10131015      if (src->type==n_algExt)
  • libpolys/polys/monomials/p_polys.cc

    r644b31 r628f663  
    35363536  rWrite(dst);
    35373537
    3538   Print("\nOldPar: %d\n", OldPar);
     3538  /*Print("\nOldPar: %d\n", OldPar);
    35393539  for( int i = 1; i <= OldPar; i++ )
    35403540  {
    35413541    Print("par(%d) -> par/var (%d)\n", i, par_perm[i-1]);
    3542   }
     3542  }*/
    35433543#endif
    35443544  if( z == NULL )
     
    35933593  assume( nMap != NULL );
    35943594
    3595   poly qq = p_PermPoly(zz, par_perm - 1, srcExtRing, dst, nMap, NULL, rVar(srcExtRing) );
     3595  poly qq;
     3596  if (rPar (srcExtRing) || (!rPar (srcExtRing) && !rPar ()))
     3597  {
     3598    assume (par_perm != NULL);
     3599    qq = p_PermPoly(zz, par_perm-1, srcExtRing, dst, nMap, NULL, rVar(srcExtRing) );
     3600  }
     3601  else
     3602    qq = p_PermPoly(zz, par_perm, srcExtRing, dst, nMap, NULL, rVar(srcExtRing) );
    35963603//       poly p_PermPoly (poly p, int * perm, const ring oldRing, const ring dst, nMapFunc nMap, int *par_perm, int OldPar)
    35973604
     
    36293636      qq = p_Init(dst);
    36303637      assume( nMap != NULL );
     3638      //PrintS("p in other branch: ");
     3639      //p_Write (p, oldRing); PrintLn();
     3640
    36313641      number n = nMap(p_GetCoeff(p, oldRing), oldRing->cf, dst->cf);
    36323642
     3643      assume (n_Test (n,dst->cf));
     3644
    36333645      if ( nCoeff_is_algExt(dst->cf) )
     3646      {
     3647
     3648      //PrintS("n: ");
     3649      //p_Write ((poly) n, dst->cf->extRing); PrintLn();
    36343650        n_Normalize(n, dst->cf);
     3651      //PrintS("n nach normalize: ");
     3652      //p_Write ((poly)n, dst->cf->extRing); PrintLn();
     3653      }
    36353654
    36363655      p_GetCoeff(qq, dst) = n;// Note: n can be a ZERO!!!
     
    36493668
    36503669      if ( nCoeff_is_algExt(dst->cf) )
     3670      {
     3671      //PrintS("p: ");
     3672      //p_Write (p, oldRing); PrintLn();
     3673      //PrintS("aq for normalize: ");
     3674      //p_Write (aq, dst);PrintLn();
    36513675        p_Normalize(aq,dst);
     3676      //PrintS("aq after normalize: ");
     3677      //p_Write (aq, dst);PrintLn();
     3678      }
     3679
    36523680
    36533681      if (aq == NULL)
Note: See TracChangeset for help on using the changeset viewer.