Changeset 87343b in git


Ignore:
Timestamp:
Feb 20, 2013, 10:28:04 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'cbf866d4f8c3861325311c042cb2033c053453b2')
Children:
0723d52f38b257cac43d6e4c57aa7a5d243f5002
Parents:
628f663dc4f87ee80a30f2fabcac34fba9b2b144
git-author:
Martin Lee <martinlee84@web.de>2013-02-20 22:28:04+01:00
git-committer:
Martin Lee <martinlee84@web.de>2013-02-21 10:18:19+01:00
Message:
fixed fetch/imap so far
still misses map from trans to alg extensions
Location:
libpolys/polys
Files:
2 edited

Legend:

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

    r628f663 r87343b  
    921921#endif
    922922
    923 number naCopyExt(number a, const coeffs src, const coeffs dst)
    924 {
     923number naCopyTrans2AlgExt(number a, const coeffs src, const coeffs dst)
     924{
     925  assume (nCoeff_is_transExt (src));
     926  assume (nCoeff_is_algExt (dst));
    925927  fraction fa=(fraction)a;
     928  assume( rSamePolyRep(src->extRing, dst->extRing) );
    926929  poly p = p_Copy(NUM(fa),src->extRing);
    927   assume( rSamePolyRep(src->extRing, dst->extRing) );
    928930  definiteReduce(p, dst->extRing->qideal->m[0], dst);
     931  assume (p_Test (p, dst->extRing));
    929932  return (number)p;
    930933}
     
    10031006         return ndCopyMap; // naCopyMap;         /// Q(a)   --> Q(a)
    10041007      else
    1005          return naCopyExt;
     1008         return naCopyTrans2AlgExt;
    10061009    }
    10071010    else
     
    10161019        return ndCopyMap; // naCopyMap;          /// Z/p(a) --> Z/p(a)
    10171020      else
    1018          return naCopyExt;
     1021         return naCopyTrans2AlgExt;
    10191022    }
    10201023    else
  • libpolys/polys/monomials/p_polys.cc

    r628f663 r87343b  
    35943594
    35953595  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) );
     3596
     3597  if ((par_perm == NULL) && (rPar(dst) != 0 && rVar (srcExtRing) > 0))
     3598  {
     3599    int* perm;
     3600    perm=(int *)omAlloc0((rVar(srcExtRing)+1)*sizeof(int));
     3601    perm[0]= 0;
     3602    for(int i=si_min(rVar(srcExtRing),rPar(dst));i>0;i--)
     3603      perm[i]=-i;
     3604    qq = p_PermPoly(zz, perm, srcExtRing, dst, nMap, NULL, rVar(srcExtRing)-1);
     3605    omFreeSize ((ADDRESS)perm, (rVar(srcExtRing)+1)*sizeof(int));
    36003606  }
    36013607  else
    3602     qq = p_PermPoly(zz, par_perm, srcExtRing, dst, nMap, NULL, rVar(srcExtRing) );
     3608    qq = p_PermPoly(zz, par_perm-1, srcExtRing, dst, nMap, NULL, rVar (srcExtRing)-1);
     3609
     3610  assume (p_Test (qq, dst));
     3611
    36033612//       poly p_PermPoly (poly p, int * perm, const ring oldRing, const ring dst, nMapFunc nMap, int *par_perm, int OldPar)
    36043613
     
    36363645      qq = p_Init(dst);
    36373646      assume( nMap != NULL );
    3638       //PrintS("p in other branch: ");
    3639       //p_Write (p, oldRing); PrintLn();
    36403647
    36413648      number n = nMap(p_GetCoeff(p, oldRing), oldRing->cf, dst->cf);
     
    36443651
    36453652      if ( nCoeff_is_algExt(dst->cf) )
    3646       {
    3647 
    3648       //PrintS("n: ");
    3649       //p_Write ((poly) n, dst->cf->extRing); PrintLn();
    36503653        n_Normalize(n, dst->cf);
    3651       //PrintS("n nach normalize: ");
    3652       //p_Write ((poly)n, dst->cf->extRing); PrintLn();
    3653       }
    36543654
    36553655      p_GetCoeff(qq, dst) = n;// Note: n can be a ZERO!!!
     
    36683668
    36693669      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();
    36753670        p_Normalize(aq,dst);
    3676       //PrintS("aq after normalize: ");
    3677       //p_Write (aq, dst);PrintLn();
    3678       }
    3679 
    36803671
    36813672      if (aq == NULL)
     
    37773768        }
    37783769      }
    3779       if ( mapped_to_par && nCoeff_is_algExt(dst->cf) )
     3770      if ( mapped_to_par && qq!= NULL && nCoeff_is_algExt(dst->cf) )
    37803771      {
    37813772        number n = p_GetCoeff(qq, dst);
Note: See TracChangeset for help on using the changeset viewer.