- Timestamp:
- Feb 19, 2013, 6:27:58 PM (11 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- 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
- Location:
- libpolys/polys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/ext_fields/algext.cc
r644b31 r628f663 921 921 #endif 922 922 923 number naCopyExt(number a, const coeffs src, const coeffs )923 number naCopyExt(number a, const coeffs src, const coeffs dst) 924 924 { 925 925 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; 927 930 } 928 931 … … 995 998 if (nCoeff_is_Q(bSrc) && nCoeff_is_Q(bDst)) 996 999 { 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)) 999 1001 { 1000 1002 if (src->type==n_algExt) … … 1009 1011 if (nCoeff_is_Zp(bSrc) && nCoeff_is_Zp(bDst)) 1010 1012 { 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)) 1012 1014 { 1013 1015 if (src->type==n_algExt) -
libpolys/polys/monomials/p_polys.cc
r644b31 r628f663 3536 3536 rWrite(dst); 3537 3537 3538 Print("\nOldPar: %d\n", OldPar);3538 /*Print("\nOldPar: %d\n", OldPar); 3539 3539 for( int i = 1; i <= OldPar; i++ ) 3540 3540 { 3541 3541 Print("par(%d) -> par/var (%d)\n", i, par_perm[i-1]); 3542 } 3542 }*/ 3543 3543 #endif 3544 3544 if( z == NULL ) … … 3593 3593 assume( nMap != NULL ); 3594 3594 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) ); 3596 3603 // poly p_PermPoly (poly p, int * perm, const ring oldRing, const ring dst, nMapFunc nMap, int *par_perm, int OldPar) 3597 3604 … … 3629 3636 qq = p_Init(dst); 3630 3637 assume( nMap != NULL ); 3638 //PrintS("p in other branch: "); 3639 //p_Write (p, oldRing); PrintLn(); 3640 3631 3641 number n = nMap(p_GetCoeff(p, oldRing), oldRing->cf, dst->cf); 3632 3642 3643 assume (n_Test (n,dst->cf)); 3644 3633 3645 if ( nCoeff_is_algExt(dst->cf) ) 3646 { 3647 3648 //PrintS("n: "); 3649 //p_Write ((poly) n, dst->cf->extRing); PrintLn(); 3634 3650 n_Normalize(n, dst->cf); 3651 //PrintS("n nach normalize: "); 3652 //p_Write ((poly)n, dst->cf->extRing); PrintLn(); 3653 } 3635 3654 3636 3655 p_GetCoeff(qq, dst) = n;// Note: n can be a ZERO!!! … … 3649 3668 3650 3669 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(); 3651 3675 p_Normalize(aq,dst); 3676 //PrintS("aq after normalize: "); 3677 //p_Write (aq, dst);PrintLn(); 3678 } 3679 3652 3680 3653 3681 if (aq == NULL)
Note: See TracChangeset
for help on using the changeset viewer.