Changeset 887121 in git


Ignore:
Timestamp:
Oct 12, 2023, 10:35:13 AM (7 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
97d4388aa30827472f30300122c06094a96918e1
Parents:
9c060af32d374f00ad523409ccde72f818b4acbd
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2023-10-12 10:35:13+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2023-11-07 16:19:53+01:00
Message:
add id_PermIdeal
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/maps_ip.cc

    r9c060a r887121  
    170170      int C=((matrix)data)->cols();
    171171      int R;
     172      matrix m=NULL;
    172173      if (w->rtyp==MAP_CMD) R=1;
    173174      else R=((matrix)data)->rows();
    174       matrix m=mpNew(R,C);
    175175      char *tmpR=NULL;
    176176      if(w->rtyp==MAP_CMD)
     
    186186         )
    187187      {
     188        m=mpNew(R,C);
    188189        for (i=R*C-1;i>=0;i--)
    189190        {
     
    194195      else if ((what==IMAP_CMD) || (what==FETCH_CMD))
    195196      {
    196         for (i=R*C-1;i>=0;i--)
    197         {
    198           m->m[i]=p_PermPoly(((ideal)data)->m[i],perm,preimage_r,currRing,
    199                           nMap,par_perm,P,use_mult);
    200           pTest(m->m[i]);
    201         }
     197        m=(matrix)id_PermIdeal((ideal)data,R,C,perm,preimage_r,currRing,
     198                                    nMap,par_perm,P,use_mult);
    202199      }
    203200      else /* (what==MAP_CMD) */
    204201      {
    205202        assume(what==MAP_CMD);
     203        m=mpNew(R,C);
    206204        matrix s=mpNew(N,maMaxDeg_Ma((ideal)data,preimage_r));
    207205        for (i=R*C-1;i>=0;i--)
  • kernel/GBEngine/kstd1.cc

    r9c060a r887121  
    24472447}
    24482448
    2449 ideal idPermIdeal(ideal I,const int *perm, const ring oldRing, const ring dst,
    2450        nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
    2451 {
    2452   ideal II=idInit(IDELEMS(I),I->rank);
    2453   for(int i=IDELEMS(I)-1; i>=0; i--)
    2454   {
    2455     II->m[i]=p_PermPoly(I->m[i],perm,oldRing,dst,nMap,par_perm,OldPar,use_mult);
    2456   }
    2457   return II;
    2458 }
    2459 
    24602449poly kTryHC(ideal F, ideal Q)
    24612450{
     
    24702459  rChangeCurrRing(Zp_ring);
    24712460  nMapFunc nMap=n_SetMap(save_ring->cf,Zp_ring->cf);
    2472   ideal FF=idPermIdeal(F,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
     2461  ideal FF=id_PermIdeal(F,IDELEMS(F),1,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
    24732462  ideal QQ=NULL;
    2474   if (Q!=NULL) QQ=idPermIdeal(Q,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
     2463  if (Q!=NULL) QQ=id_PermIdeal(Q,IDELEMS(Q),1,NULL,save_ring,Zp_ring,nMap,NULL,0,0);
    24752464  // call std
    24762465  ideal res=kStd(FF,QQ,testHomog,NULL,NULL);
  • libpolys/polys/simpleideals.cc

    r9c060a r887121  
    21872187  return ret;
    21882188}
     2189
     2190ideal id_PermIdeal(ideal I,int R, int C,const int *perm, const ring src, const ring dst,
     2191       nMapFunc nMap, const int *par_perm, int P, BOOLEAN use_mult)
     2192{
     2193  ideal II=(ideal)mpNew(R,C);
     2194  II->rank=I->rank;
     2195  for(int i=R*C-1; i>=0; i--)
     2196  {
     2197    II->m[i]=p_PermPoly(I->m[i],perm,src,dst,nMap,par_perm,P,use_mult);
     2198  }
     2199  return II;
     2200}
  • libpolys/polys/simpleideals.h

    r9c060a r887121  
    185185/// for julia: convert an array of poly to vector
    186186poly id_Array2Vector(poly *m, unsigned n, const ring R);
     187
     188/// mapping ideals/matrices to other rings
     189ideal id_PermIdeal(ideal I,int R, int C,const int *perm, const ring src,
     190   const ring dst, nMapFunc nMap, const int *par_perm, int P, BOOLEAN use_mult);
    187191#endif
Note: See TracChangeset for help on using the changeset viewer.