Changeset 3b7e97 in git


Ignore:
Timestamp:
Jun 27, 2008, 2:06:07 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
86aa6a1edce194b9d6d8b5116984a276b2c0a7ec
Parents:
a883a37dae9ce90a24c978095e70ce11d4466058
Message:
*hannes: rAssure_TDeg


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

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    ra883a3 r3b7e97  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.88 2008-06-26 18:35:45 motsak Exp $ */
     4/* $Id: ring.cc,v 1.89 2008-06-27 12:06:07 Singular Exp $ */
    55
    66/*
     
    435435      } else
    436436        PrintS(" (NULL)");
    437        
    438437    }
    439438#endif
     
    37103709//          WarnS("error in nc_SetupQuotient"); // cleanup?      rDelete(res);       return r;  // just go on...?
    37113710        }
    3712 #endif     
     3711#endif
    37133712    }
    37143713
     
    37183717    assume(rIsSCA(r) == rIsSCA(old_ring));
    37193718    assume(ncRingType(r) == ncRingType(old_ring));
    3720 #endif     
     3719#endif
    37213720
    37223721  }
    37233722
    37243723  assume(currRing == r);
    3725  
    3726  
     3724
     3725
    37273726#ifdef HAVE_PLURAL
    37283727#if MYTEST
     
    37743773        WarnS("error in nc_rComplete");      // cleanup?//      rDelete(res);//      return r;      // just go on..
    37753774      }
    3776     }   
     3775    }
    37773776    assume(rIsPluralRing(r) == rIsPluralRing(res));
    3778 #endif     
     3777#endif
    37793778  }
    37803779  return res;
     
    37933792      {
    37943793        pos=r->typ[i].data.dp.place;
     3794        printf("no change, pos=%d\n",pos);
    37953795        return r;
    37963796      }
    37973797    }
    37983798  }
    3799   ring res=rCopy0(r, FALSE, FALSE);
     3799  ring res=rCopy(r);
    38003800  i=rBlocks(r);
    38013801  int j;
    38023802
    3803   res->order=(int *)omMemDup(r->order);
    3804   res->block0=(int *)omMemDup(r->block0);
    3805   res->block1=(int *)omMemDup(r->block1);
    3806   int ** wvhdl =(int **)omAlloc0(i*sizeof(int**));
    3807   for(j=i-1;j>=0;j--)
    3808   {
    3809     if (r->wvhdl[j] != NULL)
    3810     {
    3811       wvhdl[j] = (int*) omMemDup(r->wvhdl[j-1]);
    3812     }
    3813   }
    3814   res->wvhdl = wvhdl;
    3815   res->VarOffset=(int*)omMemDup(r->VarOffset);
    3816 
    38173803  res->ExpL_Size=r->ExpL_Size+1; // one word more in each monom
    3818   res->CmpL_Size=r->CmpL_Size;
    38193804  res->PolyBin=omGetSpecBin(POLYSIZE + (res->ExpL_Size)*sizeof(long));
     3805  omFree((ADDRESS)res->ordsgn);
    38203806  res->ordsgn=(long *)omAlloc0(res->ExpL_Size*sizeof(long));
    38213807  for(j=0;j<r->CmpL_Size;j++)
     
    38243810  }
    38253811  res->OrdSize=r->OrdSize+1;   // one block more for pSetm
    3826   res->typ=(sro_ord*)omAlloc(res->OrdSize*sizeof(sro_ord));
     3812  if (r->typ!=NULL)
     3813    omFree((ADDRESS)res->typ);
     3814  res->typ=(sro_ord*)omAlloc0(res->OrdSize*sizeof(sro_ord));
    38273815  if (r->typ!=NULL)
    38283816    memcpy(res->typ,r->typ,r->OrdSize*sizeof(sro_ord));
    3829   // the additionla block for pSetm: total degree at the last word
     3817  // the additional block for pSetm: total degree at the last word
    38303818  // but not included in the compare part
    3831   res->typ[res->OrdSize].ord_typ=ro_dp;
    3832   res->typ[res->OrdSize].data.dp.start=start_var;
    3833   res->typ[res->OrdSize].data.dp.end=end_var;
    3834   res->typ[res->OrdSize].data.dp.place=res->ExpL_Size-1;
     3819  res->typ[res->OrdSize-1].ord_typ=ro_dp;
     3820  res->typ[res->OrdSize-1].data.dp.start=start_var;
     3821  res->typ[res->OrdSize-1].data.dp.end=end_var;
     3822  res->typ[res->OrdSize-1].data.dp.place=res->ExpL_Size-1;
    38353823  pos=res->ExpL_Size-1;
    3836   if ((start_var==1) && (end_var==res->N)) res->pOrdIndex=pos;
     3824  //if ((start_var==1) && (end_var==res->N)) res->pOrdIndex=pos;
     3825  extern void p_Setm_General(poly p, ring r);
     3826  res->p_Setm=p_Setm_General;
     3827  // ----------------------------
     3828  omFree((ADDRESS)res->p_Procs);
     3829  res->p_Procs = (p_Procs_s*)omAlloc(sizeof(p_Procs_s));
     3830  p_ProcsSet(res, res->p_Procs);
     3831  if (res->qideal!=NULL) id_Delete(&res->qideal,res);
    38373832#ifdef HAVE_PLURAL
    38383833  if (rIsPluralRing(res))
    38393834  {
     3835    nc_rKill(res);
    38403836    if ( nc_rComplete(r, res, false) ) // no qideal!
    38413837    {
     
    38453841  }
    38463842#endif
     3843  if (r->qideal!=NULL) res->qideal=idrCopyR_NoSort(r->qideal,r);
    38473844  return res;
    38483845}
     
    39453942        }
    39463943        assume(rIsPluralRing(r) == rIsPluralRing(new_r));
    3947 #endif     
     3944#endif
    39483945      }
    39493946      return new_r;
     
    39743971      assume(rIsSCA(new_r) == rIsSCA(old_r));
    39753972      assume(ncRingType(new_r) == ncRingType(old_r));
    3976 #endif     
     3973#endif
    39773974    }
    39783975    rTest(new_r);
    3979     rTest(old_r);   
    3980   } 
     3976    rTest(old_r);
     3977  }
    39813978  return new_r;
    39823979}
     
    40013998    }
    40023999    assume(rIsPluralRing(new_r) == rIsPluralRing(old_r));
    4003 #endif     
     4000#endif
    40044001    rChangeCurrRing(new_r);
    40054002    if (old_r->qideal != NULL)
     
    40184015      assume(rIsSCA(new_r) == rIsSCA(old_r));
    40194016      assume(ncRingType(new_r) == ncRingType(old_r));
    4020 #endif     
     4017#endif
    40214018    }
    40224019    rTest(new_r);
Note: See TracChangeset for help on using the changeset viewer.