Changeset 08c051 in git


Ignore:
Timestamp:
Aug 9, 2004, 6:55:54 PM (20 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
394dad95e90d48ebfcb18242e46a0d62f4c1e448
Parents:
44f44d4d66938c7ce97122658bd25e0434ecd70a
Message:
*hannes: fix rOpp


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

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    r44f44d r08c051  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.14 2004-08-09 16:16:01 Singular Exp $ */
     4/* $Id: ring.cc,v 1.15 2004-08-09 16:55:54 Singular Exp $ */
    55
    66/*
     
    34693469  for(int i=i2; i>=0; i--)
    34703470  {
    3471     //Print("ex: %d <-> %d\n",i,rVar(r)-1-i);
     3471    // index: 0..N-1
     3472    //Print("ex var names: %d <-> %d\n",i,rVar(r)-1-i);
    34723473    // exchange names
    34733474    char *p;
    3474     int t;
    34753475    p=r->names[rVar(r)-1-i];
    34763476    r->names[rVar(r)-1-i]=r->names[i];
    34773477    r->names[i]=p;
     3478  }
     3479  i2=(rVar(r)+1)/2;
     3480  for(int i=i2; i>0; i--)
     3481  {
     3482    // index: 1..N
     3483    //Print("ex var places: %d <-> %d\n",i,rVar(r)+1-i);
    34783484    // exchange VarOffset
     3485    int t;
    34793486    t=r->VarOffset[i];
    3480     r->VarOffset[i]=r->VarOffset[rVar(r)-1-i];
    3481     r->VarOffset[rVar(r)-1-i]=t;
     3487    r->VarOffset[i]=r->VarOffset[rVar(r)+1-i];
     3488    r->VarOffset[rVar(r)+1-i]=t;
    34823489  }
    34833490  // change names:
     
    35403547  r->block0[0]=1;
    35413548  r->block1[0]=rVar(r);
     3549  r->order[1]=0;
    35423550  rDebugPrint(r);
    35433551  return r;
Note: See TracChangeset for help on using the changeset viewer.