Changeset b147507 in git for kernel/ring.cc


Ignore:
Timestamp:
Oct 13, 2004, 12:50:37 PM (20 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
de1a82971d264aceac071d45613465890997aeb5
Parents:
9f28a8bf4d221b97630205e49678195c233e099d
Message:
*levandov: final and cosmetic changes to Opposite stuff


git-svn-id: file:///usr/local/Singular/svn/trunk@7570 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    r9f28a8 rb147507  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.22 2004-10-12 16:16:37 Singular Exp $ */
     4/* $Id: ring.cc,v 1.23 2004-10-13 10:50:37 levandov Exp $ */
    55
    66/*
     
    35283528  }
    35293529}
     3530
    35303531#define rOppVar(R,I) (rVar(R)+1-I)
    35313532
     
    35343535  /* that is R^opp, where f (*^opp) g = g*f  */
    35353536{
    3536   ring save=currRing; 
    3537   ring r=rCopy0(src);
     3537  ring save = currRing; 
     3538  ring    r = rCopy0(src);
    35383539  // change vars v1..vN -> vN..v1
    35393540  int i;
    3540   int i2=(rVar(r)-1)/2;
    3541   for(int i=i2; i>=0; i--)
     3541  int i2 = (rVar(r)-1)/2;
     3542  for(i=i2; i>=0; i--)
    35423543  {
    35433544    // index: 0..N-1
     
    35453546    // exchange names
    35463547    char *p;
    3547     p=r->names[rVar(r)-1-i];
    3548     r->names[rVar(r)-1-i]=r->names[i];
    3549     r->names[i]=p;
     3548    p = r->names[rVar(r)-1-i];
     3549    r->names[rVar(r)-1-i] = r->names[i];
     3550    r->names[i] = p;
    35503551  }
    35513552//  i2=(rVar(r)+1)/2;
     
    35643565  {
    35653566    char *p=r->names[i];
    3566     if(isupper(*p)) *p=tolower(*p);
    3567     else            *p=toupper(*p);
     3567    if(isupper(*p)) *p = tolower(*p);
     3568    else            *p = toupper(*p);
    35683569  }
    35693570  // change ordering: listing
     
    36093610//    }
    36103611//  }
    3611   // Change order/block structurea (needed for rPrint, rAdd etc.)
     3612  // Change order/block structures (needed for rPrint, rAdd etc.)
    36123613  int j=0;
    36133614  int l=rBlocks(src);
     
    37253726  rComplete(r);
    37263727#ifdef RDEBUG
    3727   rDebugPrint(r);
     3728  //  rDebugPrint(r);
    37283729#endif
    37293730  rTest(r);
    3730   /* DO NOT CALL: rComplete(r); - it is all done */
    37313731#ifdef HAVE_PLURAL
    37323732  /* now, we initialize a non-comm structure on r */
     
    37383738  rChangeCurrRing(r); 
    37393739  /* basic nc constructions  */
    3740   r->nc = (nc_struct *)omAlloc0(sizeof(nc_struct));
    3741   r->nc->ref = 1; /* in spite of Copy(src)? */
     3740  r->nc           = (nc_struct *)omAlloc0(sizeof(nc_struct));
     3741  r->nc->ref      = 1; /* in spite of rCopy(src)? */
    37423742  r->nc->basering = r;
    3743   r->nc->type =  src->nc->type;
    3744   int *perm = (int *)omAlloc0((rVar(r)+1)*sizeof(int));
    3745   int *par_perm = NULL;
    3746   nMapFunc nMap = nSetMap(src);
     3743  r->nc->type     =  src->nc->type;
     3744  int *perm       = (int *)omAlloc0((rVar(r)+1)*sizeof(int));
     3745  int *par_perm   = NULL;
     3746  nMapFunc nMap   = nSetMap(src);
    37473747  int j;
    37483748  int ni,nj;
     
    37823782{
    37833783  ring Ropp = rOpposite(R);
    3784   ring Renv=NULL;
     3784  ring Renv = NULL;
    37853785  int stat = rSum(R, Ropp, Renv);
    3786   if (stat <=0)
     3786  if ( stat <=0 )
    37873787    WarnS("Error in rEnvelope at rSum");
    37883788  return Renv;
Note: See TracChangeset for help on using the changeset viewer.