Changeset 07b3e1 in git for kernel/ideals.cc


Ignore:
Timestamp:
Nov 27, 2006, 1:55:57 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
cd8ee422bc0a3224af995a6be9e3b136c80507cc
Parents:
1d138cc219f68b925aa7c15df754cc1eaf1da469
Message:
*hannes: bug fix


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

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r1d138c r07b3e1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.25 2006-11-24 15:54:54 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.26 2006-11-27 12:55:57 Singular Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    35703570  res->rank=si_max(res->rank,idRankFreeModule(res));
    35713571
    3572   intvec *wtmp=NULL;
     3572  int del=0;
    35733573  loop
    35743574  {
    35753575    next_gen = idReadOutUnits(res,&next_comp);
    35763576    if (next_gen<0) break;
     3577    del++;
    35773578    syGaussForOne(res,next_gen,next_comp,0,IDELEMS(res));
    35783579    idDeleteComp(res,next_comp);
    35793580    if ((w !=NULL)&&(*w!=NULL))
    35803581    {
    3581       if (wtmp==NULL)
    3582       {
    3583         if ((*w)->length()==1)
    3584         {
    3585           wtmp=new intvec(1);
    3586           // (*wtmp)[0]=0;
    3587         }
    3588         else
    3589         {
    3590           wtmp=new intvec((*w)->length()-1);
    3591           for(i=0;i<wtmp->length();i++) (*wtmp)[i]=(**w)[i];
    3592         }
    3593       }
    3594       for(i=next_comp;i<(*w)->length();i++) (*wtmp)[i-1]=(*wtmp)[i];
    3595     }
    3596   }
    3597   if ((w !=NULL)&&(*w!=NULL)&&(wtmp!=NULL))
    3598   {
     3582      for(i=next_comp;i<(*w)->length();i++) (**w)[i-1]=(**w)[i];
     3583    }
     3584  }
     3585  if ((w !=NULL)&&(*w!=NULL) &&(del>0))
     3586  {
     3587    intvec *wtmp=new intvec((*w)->length()-del);
     3588    for(i=0;i<res->rank;i++) (*wtmp)[i]=(**w)[i];
    35993589    delete *w;
    36003590    *w=wtmp;
    3601     if (wtmp->length()>1)
    3602     {
    3603       wtmp=new intvec(res->rank);
    3604       for(i=0;i<res->rank;i++) (*wtmp)[i]=(**w)[i];
    3605       delete *w;
    3606       *w=wtmp;
    3607     }
    36083591  }
    36093592  idSkipZeroes(res);
Note: See TracChangeset for help on using the changeset viewer.