Changeset a934fb3 in git
- Timestamp:
- Mar 11, 2016, 3:36:57 PM (8 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 23812d3dd3a69ed0874b01c271d1908acd7f0f05
- Parents:
- 052df146007b4badfc821b69808a085b155cc991
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/maps_ip.cc
r052df1 ra934fb3 25 25 // #include <kernel/longalg.h> 26 26 27 #include <misc/options.h> 27 28 #include <kernel/GBEngine/kstd1.h> 28 29 #include <kernel/maps/gen_maps.h> … … 49 50 int *perm, int *par_perm, int P, nMapFunc nMap) 50 51 { 52 BOOLEAN use_mult=FALSE; 53 #ifdef HAVE_PLURAL 54 if ((what==IMAP_CMD) 55 && rIsPluralRing(currRing) 56 && rIsPluralRing(preimage_r)) 57 { 58 assume(perm!=NULL); 59 int i=1; 60 while((i<currRing->N)&&(perm[i]==0)) i++; 61 if (i<currRing->N) 62 { 63 int prev_nonnull=i; 64 i++; 65 for(;i<=currRing->N;i++) 66 { 67 if (perm[prev_nonnull] > perm[i]) 68 { 69 if (TEST_V_ALLWARN) 70 { 71 Warn("imap not usable for permuting variables, use map (%s <-> %s)",currRing->names[prev_nonnull-1],currRing->names[i-1]); 72 } 73 use_mult=TRUE; 74 break; 75 } 76 else 77 prev_nonnull=i; 78 } 79 } 80 } 81 #endif 51 82 int i; 52 83 int N = preimage_r->N; … … 103 134 else 104 135 if ( (what==IMAP_CMD) || /*(*/ (what==FETCH_CMD) /*)*/) /* && (nMap!=nCopy)*/ 105 res->data=(void *)p_PermPoly((poly)data,perm,preimage_r,currRing, nMap,par_perm,P );136 res->data=(void *)p_PermPoly((poly)data,perm,preimage_r,currRing, nMap,par_perm,P,use_mult); 106 137 else /*if (what==MAP_CMD)*/ 107 138 { … … 144 175 { 145 176 m->m[i]=p_PermPoly(((ideal)data)->m[i],perm,preimage_r,currRing, 146 nMap,par_perm,P );177 nMap,par_perm,P,use_mult); 147 178 pTest(m->m[i]); 148 179 } -
Tst/Short/ok_s.lst
r052df1 ra934fb3 57 57 bug_tr739 58 58 bug_tr745 59 bug_tr753 59 60 bug_genus_etc 60 61 conv_bi -
libpolys/polys/monomials/p_polys.cc
r052df1 ra934fb3 3925 3925 */ 3926 3926 poly p_PermPoly (poly p, const int * perm, const ring oldRing, const ring dst, 3927 nMapFunc nMap, const int *par_perm, int OldPar )3927 nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult) 3928 3928 { 3929 3929 #if 0 … … 3938 3938 assume(dst != NULL); 3939 3939 assume(dst->cf != NULL); 3940 #ifdef HAVE_PLURAL 3941 poly tmp_mm=p_One(dst); 3942 #endif 3940 3943 while (p != NULL) 3941 3944 { … … 3983 3986 p_SetExp(qq, i, e, dst); 3984 3987 else if (perm[i]>0) 3988 { 3989 #ifdef HAVE_PLURAL 3990 if(use_mult) 3991 { 3992 p_SetExp(tmp_mm,perm[i],e,dst); 3993 p_Setm(tmp_mm,dst); 3994 qq=p_Mult_mm(qq,tmp_mm,dst); 3995 p_SetExp(tmp_mm,perm[i],0,dst); 3996 3997 } 3998 else 3999 #endif 3985 4000 p_AddExp(qq,perm[i], e/*p_GetExp( p,i,oldRing)*/, dst); 4001 } 3986 4002 else if (perm[i]<0) 3987 4003 { … … 4124 4140 PrintS("result: "); p_Write(result,dst,dst); 4125 4141 #endif 4142 #ifdef HAVE_PLURAL 4143 p_LmDelete(&tmp_mm,dst); 4144 #endif 4126 4145 return result; 4127 4146 } -
libpolys/polys/monomials/p_polys.h
r052df1 ra934fb3 1915 1915 1916 1916 poly p_PermPoly (poly p, const int * perm,const ring OldRing, const ring dst, 1917 nMapFunc nMap, const int *par_perm=NULL, int OldPar=0); 1917 nMapFunc nMap, const int *par_perm=NULL, int OldPar=0, 1918 BOOLEAN use_mult=FALSE); 1918 1919 1919 1920 /*----------------------------------------------------*/
Note: See TracChangeset
for help on using the changeset viewer.